linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Lots of "error: multiple storage classes" warnings on the Linux kernel
@ 2010-08-19 12:53 Bernd Petrovitsch
  2010-08-19 19:26 ` Sam Ravnborg
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Petrovitsch @ 2010-08-19 12:53 UTC (permalink / raw)
  To: linux-sparse

Hi all!

While investigating something completely different, I noticed lots of 
"error: multiple storage classes" warnings, e.g.
----  snip  ----
  CHECK   security/keys/keyring.c
include/linux/sched.h:831:12: error: multiple storage classes: extern weak
security/keys/keyring.c:75:1: error: multiple storage classes: extern weak
security/keys/keyring.c:471:1: error: multiple storage classes: extern weak
security/keys/keyring.c:899:1: error: multiple storage classes: extern weak
security/keys/keyring.c:974:1: error: multiple storage classes: extern weak
security/keys/keyring.c:1033:1: error: multiple storage classes: extern weak
----  snip  ---- 
[ The ": extern weak" is from me to see which are actually set. ]

Is this warning correct that way (and the source should be fixed) or is
the warning in that wrong?

	Bernd 
-- 
mobile: +43 664 4416156              http://www.sysprog.at/
    Linux Software Development, Consulting and Services


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Lots of "error: multiple storage classes" warnings on the Linux kernel
  2010-08-19 12:53 Lots of "error: multiple storage classes" warnings on the Linux kernel Bernd Petrovitsch
@ 2010-08-19 19:26 ` Sam Ravnborg
  2010-08-20  8:37   ` Bernd Petrovitsch
  0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2010-08-19 19:26 UTC (permalink / raw)
  To: Bernd Petrovitsch; +Cc: linux-sparse

On Thu, Aug 19, 2010 at 02:53:12PM +0200, Bernd Petrovitsch wrote:
> Hi all!
> 
> While investigating something completely different, I noticed lots of 
> "error: multiple storage classes" warnings, e.g.
> ----  snip  ----
>   CHECK   security/keys/keyring.c
> include/linux/sched.h:831:12: error: multiple storage classes: extern weak
> security/keys/keyring.c:75:1: error: multiple storage classes: extern weak
> security/keys/keyring.c:471:1: error: multiple storage classes: extern weak
> security/keys/keyring.c:899:1: error: multiple storage classes: extern weak
> security/keys/keyring.c:974:1: error: multiple storage classes: extern weak
> security/keys/keyring.c:1033:1: error: multiple storage classes: extern weak
> ----  snip  ---- 
> [ The ": extern weak" is from me to see which are actually set. ]
> 
> Is this warning correct that way (and the source should be fixed) or is
> the warning in that wrong?

Can you cook up a small code snippet that
exhibit this without all the kernel macros etc?
This would make it easier for the sparse folks to understand.

	Sam

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Lots of "error: multiple storage classes" warnings on the Linux kernel
  2010-08-19 19:26 ` Sam Ravnborg
@ 2010-08-20  8:37   ` Bernd Petrovitsch
  0 siblings, 0 replies; 3+ messages in thread
From: Bernd Petrovitsch @ 2010-08-20  8:37 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-sparse

On Don, 2010-08-19 at 21:26 +0200, Sam Ravnborg wrote:
> On Thu, Aug 19, 2010 at 02:53:12PM +0200, Bernd Petrovitsch wrote:
[...]
> > While investigating something completely different, I noticed lots of 
> > "error: multiple storage classes" warnings, e.g.
> > ----  snip  ----
> >   CHECK   security/keys/keyring.c
> > include/linux/sched.h:831:12: error: multiple storage classes: extern weak
> > security/keys/keyring.c:75:1: error: multiple storage classes: extern weak
> > security/keys/keyring.c:471:1: error: multiple storage classes: extern weak
> > security/keys/keyring.c:899:1: error: multiple storage classes: extern weak
> > security/keys/keyring.c:974:1: error: multiple storage classes: extern weak
> > security/keys/keyring.c:1033:1: error: multiple storage classes: extern weak
> > ----  snip  ---- 
> > [ The ": extern weak" is from me to see which are actually set. ]
> > 
> > Is this warning correct that way (and the source should be fixed) or is
> > the warning in that wrong?
> 
> Can you cook up a small code snippet that
> exhibit this without all the kernel macros etc?

Of course.

> This would make it easier for the sparse folks to understand.

----  snip  ----
{341}echo 'extern int __attribute__((weak)) foobar(void);' | sparse -f -
-:1:12: error: multiple storage classes: extern weak
----  snip  ----
is a minimal example shows that.

	Bernd
-- 
Bernd Petrovitsch                  Email : bernd@petrovitsch.priv.at
                     LUGA : http://www.luga.at


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-20  8:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-19 12:53 Lots of "error: multiple storage classes" warnings on the Linux kernel Bernd Petrovitsch
2010-08-19 19:26 ` Sam Ravnborg
2010-08-20  8:37   ` Bernd Petrovitsch

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