linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Christopher Li <sparse@chrisli.org>,
	Dave Jones <davej@redhat.com>, Al Viro <viro@ftp.linux.org.uk>,
	linux-sparse@vger.kernel.org
Subject: Re: more spewage (Re: sparse segfault on ppc64)
Date: Fri, 23 Mar 2007 16:43:07 -0700	[thread overview]
Message-ID: <20070323164307.3e2e2803.rdunlap@xenotime.net> (raw)
In-Reply-To: <20070323233127.GA10115@uranus.ravnborg.org>

On Sat, 24 Mar 2007 00:31:27 +0100 Sam Ravnborg wrote:

> > 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.

That one is quite ugly IMO.  I'm surprised that a compiler
parses it.

> You could argue that the error from sparse could be better but
> it is preferable to have consistent style over the kernel.

I lean more towards "is it valid C or not"?

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

  parent reply	other threads:[~2007-03-23 23:42 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-22  6:36 sparse segfault on ppc64 Dave Jones
2007-03-22  7:33 ` Al Viro
2007-03-22  7:03   ` Christopher Li
2007-03-22 12:59     ` Al Viro
2007-03-22 22:16       ` Christopher Li
2007-03-23 23:08       ` [PATCH] Fix the annotated inline call position Christopher Li
2007-04-20 10:09         ` Josh Triplett
2007-03-22 16:04     ` sparse segfault on ppc64 Dave Jones
2007-03-22 17:11     ` Dave Jones
2007-03-22 22:10       ` Christopher Li
2007-03-23 22:04         ` more spewage (Re: sparse segfault on ppc64) Randy Dunlap
2007-03-23 22:57           ` Christopher Li
2007-03-23 23:10           ` [PATCH] handle label attributes Christopher Li
2007-03-25 18:52             ` Randy Dunlap
2007-04-20 10:17             ` Josh Triplett
2007-03-23 23:31           ` more spewage (Re: sparse segfault on ppc64) Sam Ravnborg
2007-03-23 23:01             ` Christopher Li
2007-03-23 23:43             ` Randy Dunlap [this message]
2007-03-24  6:44               ` Sam Ravnborg
2007-03-24 16:46                 ` Randy Dunlap
2007-03-24 17:02                   ` Linus Torvalds
2007-03-26 18:07                     ` Christopher Li
2007-03-26 18:50                       ` Randy Dunlap
2007-03-22 15:56   ` sparse segfault on ppc64 Dave Jones
2007-03-22 16:02     ` Al Viro
2007-03-22  8:36 ` [PATCH] vector parsing, was " Christopher Li
2007-03-23 23:14   ` [PATCH] vector parsing (take II) Christopher Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070323164307.3e2e2803.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=davej@redhat.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=sparse@chrisli.org \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).