From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH net-next] vxlan: fix rcu related warnings Date: Tue, 30 Jul 2013 16:02:45 -0700 Message-ID: <20130730160245.4b7b84a1@nehalam.linuxnetplumber.net> References: <20130730131844.7d3f92de@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: David Miller , Thomas Richter , Mike Rapoport , netdev@vger.kernel.org To: Pravin Shelar Return-path: Received: from mail-pb0-f54.google.com ([209.85.160.54]:63138 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752631Ab3G3XCt (ORCPT ); Tue, 30 Jul 2013 19:02:49 -0400 Received: by mail-pb0-f54.google.com with SMTP id ro12so11277pbb.13 for ; Tue, 30 Jul 2013 16:02:49 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 30 Jul 2013 15:17:21 -0700 Pravin Shelar wrote: > On Tue, Jul 30, 2013 at 1:18 PM, Stephen Hemminger > wrote: > > 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] * > drivers/net/vxlan.c:181:16: got struct vxlan_rdst * > 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] * > 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] * > drivers/net/vxlan.c:181:16: got struct vxlan_rdst * > 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.