Skip to content

Commit

Permalink
netif_set_xps_queue: make cpu mask const
Browse files Browse the repository at this point in the history
virtio wants to pass in cpumask_of(cpu), make parameter
const to avoid build warnings.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael S. Tsirkin authored and David S. Miller committed Oct 7, 2013
1 parent 5e8a402 commit 3573540
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -2264,11 +2264,12 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
}

#ifdef CONFIG_XPS
extern int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask,
extern int netif_set_xps_queue(struct net_device *dev,
const struct cpumask *mask,
u16 index);
#else
static inline int netif_set_xps_queue(struct net_device *dev,
struct cpumask *mask,
const struct cpumask *mask,
u16 index)
{
return 0;
Expand Down
3 changes: 2 additions & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,8 @@ static struct xps_map *expand_xps_map(struct xps_map *map,
return new_map;
}

int netif_set_xps_queue(struct net_device *dev, struct cpumask *mask, u16 index)
int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask,
u16 index)
{
struct xps_dev_maps *dev_maps, *new_dev_maps = NULL;
struct xps_map *map, *new_map;
Expand Down

0 comments on commit 3573540

Please sign in to comment.