Skip to content

Commit

Permalink
net-sysfs: store the return of get_netdev_queue_index in an unsigned int
Browse files Browse the repository at this point in the history
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 <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Antoine Tenart authored and David S. Miller committed Mar 18, 2021
1 parent ea4fe7e commit d9a063d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions net/core/net-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,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;
Expand Down Expand Up @@ -1437,7 +1438,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;

Expand Down Expand Up @@ -1479,7 +1480,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);

Expand Down Expand Up @@ -1541,7 +1543,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))
Expand Down

0 comments on commit d9a063d

Please sign in to comment.