From patchwork Mon Feb 8 17:19:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tenart X-Patchwork-Id: 378958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 818E5C433DB for ; Mon, 8 Feb 2021 17:22:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 391A064DF0 for ; Mon, 8 Feb 2021 17:22:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbhBHRVp (ORCPT ); Mon, 8 Feb 2021 12:21:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:34410 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233866AbhBHRUH (ORCPT ); Mon, 8 Feb 2021 12:20:07 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B2BE064E6E; Mon, 8 Feb 2021 17:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612804765; bh=51ZhoMUTg79iyFfvNiHV8sojQPSnhzYx6O57vmjqBNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cqSKJdkgOCXuFdIh0NLSMN1R1z4tUT1fETV1lHiGXRwRuHLGyz6ZQX1kbqsAdtt3j wh+w7na06dznYi/e5uVJX9feDSGHjDR+wCjzSNK5YN92pi4/8GE+sjS/7Gz7XppQ2I X+iGNo2H5/H5U5EyDcCkSoYTuAPBiRwncvvf1LZtglVgYvNwnwlC6pab3+9QMYV0vU Jtsn+uzpCTvFWV8KMVlWnSPDutPyBfosC1L5P2T9XZtaFMorRalaboVU9ttZZOEp8L FiBpJstgLLk3Es4ejGuP04rSlytql4f4mnijQ3+N0+BzkneVoqc6wihjpTGHraRkQp +H1aWQIjHlOJA== From: Antoine Tenart To: davem@davemloft.net, kuba@kernel.org, alexander.duyck@gmail.com Cc: Antoine Tenart , netdev@vger.kernel.org Subject: [PATCH net-next v2 02/12] net-sysfs: store the return of get_netdev_queue_index in an unsigned int Date: Mon, 8 Feb 2021 18:19:07 +0100 Message-Id: <20210208171917.1088230-3-atenart@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210208171917.1088230-1-atenart@kernel.org> References: <20210208171917.1088230-1-atenart@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In net-sysfs, get_netdev_queue_index returns an unsigned int. Some of its callers use an unsigned long to store the returned value. Update the code to be consistent, this should only be cosmetic. Signed-off-by: Antoine Tenart --- net/core/net-sysfs.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index e052fc5f7e94..5a39e9b38e5f 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -1320,7 +1320,8 @@ static ssize_t xps_cpus_show(struct netdev_queue *queue, int cpu, len, ret, num_tc = 1, tc = 0; struct net_device *dev = queue->dev; struct xps_dev_maps *dev_maps; - unsigned long *mask, index; + unsigned long *mask; + unsigned int index; if (!netif_is_multiqueue(dev)) return -ENOENT; @@ -1390,7 +1391,7 @@ static ssize_t xps_cpus_store(struct netdev_queue *queue, const char *buf, size_t len) { struct net_device *dev = queue->dev; - unsigned long index; + unsigned int index; cpumask_var_t mask; int err; @@ -1432,7 +1433,8 @@ static ssize_t xps_rxqs_show(struct netdev_queue *queue, char *buf) int j, len, ret, num_tc = 1, tc = 0; struct net_device *dev = queue->dev; struct xps_dev_maps *dev_maps; - unsigned long *mask, index; + unsigned long *mask; + unsigned int index; index = get_netdev_queue_index(queue); @@ -1494,7 +1496,8 @@ static ssize_t xps_rxqs_store(struct netdev_queue *queue, const char *buf, { struct net_device *dev = queue->dev; struct net *net = dev_net(dev); - unsigned long *mask, index; + unsigned long *mask; + unsigned int index; int err; if (!ns_capable(net->user_ns, CAP_NET_ADMIN))