Skip to content

Commit

Permalink
net: remove some sparse warnings
Browse files Browse the repository at this point in the history
netdev_adjacent_add_links() and netdev_adjacent_del_links()
are static.

queue->qdisc has __rcu annotation, need to use RCU_INIT_POINTER()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 5, 2015
1 parent f4575d3 commit 2ce1ee1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5294,7 +5294,7 @@ void netdev_upper_dev_unlink(struct net_device *dev,
}
EXPORT_SYMBOL(netdev_upper_dev_unlink);

void netdev_adjacent_add_links(struct net_device *dev)
static void netdev_adjacent_add_links(struct net_device *dev)
{
struct netdev_adjacent *iter;

Expand All @@ -5319,7 +5319,7 @@ void netdev_adjacent_add_links(struct net_device *dev)
}
}

void netdev_adjacent_del_links(struct net_device *dev)
static void netdev_adjacent_del_links(struct net_device *dev)
{
struct netdev_adjacent *iter;

Expand Down Expand Up @@ -6627,7 +6627,7 @@ struct netdev_queue *dev_ingress_queue_create(struct net_device *dev)
if (!queue)
return NULL;
netdev_init_one_queue(dev, queue, NULL);
queue->qdisc = &noop_qdisc;
RCU_INIT_POINTER(queue->qdisc, &noop_qdisc);
queue->qdisc_sleeping = &noop_qdisc;
rcu_assign_pointer(dev->ingress_queue, queue);
#endif
Expand Down

0 comments on commit 2ce1ee1

Please sign in to comment.