From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Subject: Re: more spewage (Re: sparse segfault on ppc64) Date: Sat, 24 Mar 2007 00:31:27 +0100 Message-ID: <20070323233127.GA10115@uranus.ravnborg.org> References: <20070322063600.GD15364@redhat.com> <20070322073344.GU4095@ftp.linux.org.uk> <20070322070354.GA22151@chrisli.org> <20070322171118.GL15364@redhat.com> <20070322221050.GC22151@chrisli.org> <20070323150459.52b02342.rdunlap@xenotime.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from pasmtpb.tele.dk ([80.160.77.98]:40442 "EHLO pasmtpB.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753206AbXCWXbF (ORCPT ); Fri, 23 Mar 2007 19:31:05 -0400 Content-Disposition: inline In-Reply-To: <20070323150459.52b02342.rdunlap@xenotime.net> Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Randy Dunlap Cc: Christopher Li , Dave Jones , Al Viro , linux-sparse@vger.kernel.org > 1. net/sched/cls_api.c, lines 593-611: > > return 0; > rtattr_failure: __attribute__ ((unused)) > return -1; > } > > ... > > return 0; > rtattr_failure: __attribute__ ((unused)) > return -1; > } > > These spew: > > net/sched/cls_api.c:593:17: error: typename in expression > net/sched/cls_api.c:594:2: error: Expected ; at end of statement > net/sched/cls_api.c:594:2: error: got return > net/sched/cls_api.c:611:17: error: typename in expression > net/sched/cls_api.c:612:2: error: Expected ; at end of statement > net/sched/cls_api.c:612:2: error: got return > net/sched/cls_api.c:593:17: error: undefined identifier '__attribute__' > net/sched/cls_api.c:611:17: error: undefined identifier '__attribute__' > > > 2. in 2.6.21-rc4-mm1 only AFAIK, arch/x86_64/kernel/early-quirks.c, #79: > > static struct __initdata chipset early_qrk[] = { > { PCI_VENDOR_ID_NVIDIA, nvidia_bugs }, > { PCI_VENDOR_ID_VIA, via_bugs }, > { PCI_VENDOR_ID_ATI, ati_bugs }, > {} > }; In this case it is only good that sparse complains because the __initdata is not placed right before the variable name as it should be. You could argue that the error from sparse could be better but it is preferable to have consistent style over the kernel. Sam