From patchwork Thu Jan 28 14:43:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antoine Tenart X-Patchwork-Id: 12053839 X-Patchwork-Delegate: kuba@kernel.org 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.3 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 8D7C3C433E9 for ; Thu, 28 Jan 2021 14:47:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5959464DEC for ; Thu, 28 Jan 2021 14:47:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232096AbhA1OrC (ORCPT ); Thu, 28 Jan 2021 09:47:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:49438 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231915AbhA1Ooz (ORCPT ); Thu, 28 Jan 2021 09:44:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id D329D64DE0; Thu, 28 Jan 2021 14:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1611845054; bh=51ZhoMUTg79iyFfvNiHV8sojQPSnhzYx6O57vmjqBNY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ex7p/J2qUYhRn+D9PTgxpX4tZx7LSNd8kk+XNeYm/tPI4bJHqjAc6+f51yw/PhVuP W9CKBe4EYuGN3qbY8uiNLDS+qQ23V9wKWnlhE2FAiStapgjr0jsX270wUFMXWvPHxo j9mPSBtSQbhaXLSywOmspXt9FdvRAHcSASIR8qyhprwSKd44W9zeSJyi7Z4y4nJGGO zBVKGjiJvkoISKWNpA7mlu3xgYvWs7+yg3EeVJVmMkMVu/cPSBb33arS8NwDsv++/L 06/pblEdPLh3ystGAJ+L8CAEL16bNrXSdh0OV8ZWaG8NGPwRCcidclipb2ZhCrTcej VO+KqJQS/xsWQ== 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 02/11] net-sysfs: store the return of get_netdev_queue_index in an unsigned int Date: Thu, 28 Jan 2021 15:43:56 +0100 Message-Id: <20210128144405.4157244-3-atenart@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210128144405.4157244-1-atenart@kernel.org> References: <20210128144405.4157244-1-atenart@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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))