Skip to content

Commit

Permalink
netpoll: add RCU annotation to npinfo field
Browse files Browse the repository at this point in the history
dev->npinfo is protected by RCU.

This fixes the following sparse warnings:

net/core/netpoll.c:177:48: error: incompatible types in comparison expression (different address spaces)
net/core/netpoll.c:200:35: error: incompatible types in comparison expression (different address spaces)
net/core/netpoll.c:221:35: error: incompatible types in comparison expression (different address spaces)
net/core/netpoll.c:327:18: error: incompatible types in comparison expression (different address spaces)

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Cong Wang authored and David S. Miller committed Jan 28, 2013
1 parent ce4a600 commit 5fbee84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ struct net_device {
void (*destructor)(struct net_device *dev);

#ifdef CONFIG_NETPOLL
struct netpoll_info *npinfo;
struct netpoll_info __rcu *npinfo;
#endif

#ifdef CONFIG_NET_NS
Expand Down

0 comments on commit 5fbee84

Please sign in to comment.