Re: [PATCH net-next] vxlan: fix rcu related warnings
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2013-07-30 23:02:49
On Tue, 30 Jul 2013 15:17:21 -0700 Pravin Shelar [off-list ref] wrote:
On Tue, Jul 30, 2013 at 1:18 PM, Stephen Hemminger [off-list ref] wrote:quoted
Vxlan remote list is protected by RCU but since first_remote returns a bare pointer, sparse complains. Split out the rcu and non-rcu access to the list. Ok to replace list_for_or_null with just list_entry_rcu because remotes list must be non-empty.I am still getting following sparse waning. CHECK drivers/net/vxlan.c drivers/net/vxlan.c:181:16: warning: incorrect type in return expression (different address spaces) drivers/net/vxlan.c:181:16: expected struct vxlan_rdst [noderef] <asn:4>* drivers/net/vxlan.c:181:16: got struct vxlan_rdst *<noident> drivers/net/vxlan.c:748:59: warning: incorrect type in initializer (different address spaces) drivers/net/vxlan.c:748:59: expected struct vxlan_rdst *rdst drivers/net/vxlan.c:748:59: got struct vxlan_rdst [noderef] <asn:4>* drivers/net/vxlan.c:181:16: warning: incorrect type in return expression (different address spaces) drivers/net/vxlan.c:181:16: expected struct vxlan_rdst [noderef] <asn:4>* drivers/net/vxlan.c:181:16: got struct vxlan_rdst *<noident> drivers/net/vxlan.c:996:42: warning: dereference of noderef expression -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Which version of sparse? I don't see this with latest version.