diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-01-26 14:28:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-27 18:02:57 -0500 |
commit | 13707f9e5e46342b7b16c58be91ad93a476c3ffd (patch) | |
tree | 025764fd464f83300cab236da2ce4b26c5b9703c /drivers/net/bnx2x | |
parent | ccf434380d1a67df2dcb9113206b77d0cb0a1cef (diff) |
drivers/net: remove some rcu sparse warnings
Add missing __rcu annotations and helpers.
minor : Fix some rcu_dereference() calls in macvtap
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x')
-rw-r--r-- | drivers/net/bnx2x/bnx2x.h | 2 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_main.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 8e4183717d91..dfdb9b51ae53 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h | |||
@@ -1110,7 +1110,7 @@ struct bnx2x { | |||
1110 | #define BNX2X_CNIC_FLAG_MAC_SET 1 | 1110 | #define BNX2X_CNIC_FLAG_MAC_SET 1 |
1111 | void *t2; | 1111 | void *t2; |
1112 | dma_addr_t t2_mapping; | 1112 | dma_addr_t t2_mapping; |
1113 | struct cnic_ops *cnic_ops; | 1113 | struct cnic_ops __rcu *cnic_ops; |
1114 | void *cnic_data; | 1114 | void *cnic_data; |
1115 | u32 cnic_tag; | 1115 | u32 cnic_tag; |
1116 | struct cnic_eth_dev cnic_eth_dev; | 1116 | struct cnic_eth_dev cnic_eth_dev; |
diff --git a/drivers/net/bnx2x/bnx2x_main.c b/drivers/net/bnx2x/bnx2x_main.c index 8cdcf5b39d1e..a2a1bc43a1d2 100644 --- a/drivers/net/bnx2x/bnx2x_main.c +++ b/drivers/net/bnx2x/bnx2x_main.c | |||
@@ -9862,7 +9862,8 @@ static int bnx2x_cnic_ctl_send(struct bnx2x *bp, struct cnic_ctl_info *ctl) | |||
9862 | int rc = 0; | 9862 | int rc = 0; |
9863 | 9863 | ||
9864 | mutex_lock(&bp->cnic_mutex); | 9864 | mutex_lock(&bp->cnic_mutex); |
9865 | c_ops = bp->cnic_ops; | 9865 | c_ops = rcu_dereference_protected(bp->cnic_ops, |
9866 | lockdep_is_held(&bp->cnic_mutex)); | ||
9866 | if (c_ops) | 9867 | if (c_ops) |
9867 | rc = c_ops->cnic_ctl(bp->cnic_data, ctl); | 9868 | rc = c_ops->cnic_ctl(bp->cnic_data, ctl); |
9868 | mutex_unlock(&bp->cnic_mutex); | 9869 | mutex_unlock(&bp->cnic_mutex); |