macvlan: use the right RCU api
authorEric Dumazet <edumazet@google.com>
Sat, 30 Mar 2013 10:08:44 +0000 (10:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 30 Mar 2013 21:31:25 +0000 (17:31 -0400)
commite052f7e64daae6aa7a7ccd003b3c285d99755afb
tree4c8b157b5038d77c47ebf58c1dabf8d2915642cd
parent4c3d5e7b41dda1b1372bfc2545ef092a1bc5ad33
macvlan: use the right RCU api

Make sure we use proper API to fetch dev->rx_handler_data,
instead of ugly casts.

Rename macvlan_port_get() to macvlan_port_get_rtnl() to document fact
that we hold RTNL when needed, with lockdep support.

This removes sparse warnings as well (CONFIG_SPARSE_RCU_POINTER=y)

CHECK   drivers/net/macvlan.c
drivers/net/macvlan.c:706:37: warning: cast removes address space of expression
drivers/net/macvlan.c:775:16: warning: cast removes address space of expression
drivers/net/macvlan.c:924:16: warning: cast removes address space of expression

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c