From: Sam Ravnborg <sam@ravnborg.org>
To: Jan Beulich <jbeulich@novell.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
StevenWhitehouse <swhiteho@redhat.com>,
linux-next@vger.kernel.org
Subject: Re: linux-next: kbuild tree build failure
Date: Tue, 5 May 2009 08:43:17 +0200 [thread overview]
Message-ID: <20090505064317.GA14708@uranus.ravnborg.org> (raw)
In-Reply-To: <49FFFA36.76EA.0078.0@novell.com>
On Tue, May 05, 2009 at 07:35:02AM +0100, Jan Beulich wrote:
> >>> Stephen Rothwell <sfr@canb.auug.org.au> 05.05.09 03:17 >>>
> >OK, looking at the preprocessor output, I see we have a previous variable
> >(static match_table_t __initconst tokens) with __attribute__ ((__section__
> >(".init.rodata"))) but it is not const ... (This came from commit
> >a447c0932445f92ce6f4c1bd020f62c5097a7842 "vfs: Use const for kernel
> >parser table" which changed "tokens" from __initdata to __initconst. Not
> >using "const" seems deliberate, but the changelog does not include enough
> >information as to why.)
> >
> >So, I will revert the above commit for today to allow it to be "improved"
> >by also fixing the tokens variable definition above. Of course there may
> >be other places where such mixed definitions exist.
>
> That is the downside of not folding the 'const' modifier into the __initconst
> annotation. It is *always* an error to annotate something __initconst but
> not also make it const.
But if we folded const in __initconst would this be correct:
drivers/net/eql.c:static const char version[] __initconst =
?
It is now:
static const char version[] = ...
And will become:
static char version[] const =
gcc does not like the latter:
$ cat jan.c:
static const char version[] = "oldstuff";
static char version2[] const = "newstuff";
void foo(const char bar[])
{
}
void baz()
{
foo(version);
foo(version2);
}
$ gcc jan.c:
jan.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'
jan.c: In function 'baz':
jan.c:11: error: 'version2' undeclared (first use in this function)
jan.c:11: error: (Each undeclared identifier is reported only once
jan.c:11: error: for each function it appears in.)
Sam
next prev parent reply other threads:[~2009-05-05 6:41 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 1:17 linux-next: kbuild tree build failure Stephen Rothwell
2009-05-05 6:35 ` Jan Beulich
2009-05-05 6:43 ` Sam Ravnborg [this message]
2009-05-05 7:04 ` Jan Beulich
2009-05-05 11:11 ` [PATCH] nfs: fix build error in nfsroot with initconst Sam Ravnborg
2009-05-05 12:48 ` Jan Beulich
2009-05-06 3:32 ` Stephen Rothwell
2009-05-06 4:40 ` Sam Ravnborg
2009-05-06 13:45 ` Trond Myklebust
2009-05-20 1:30 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2009-10-14 1:20 linux-next: kbuild tree build failure Stephen Rothwell
2009-10-14 7:43 ` Sam Ravnborg
2009-06-09 1:48 Stephen Rothwell
2009-06-09 16:15 ` Sam Ravnborg
2009-06-09 16:19 ` Stephen Rothwell
2009-06-09 21:04 ` Sam Ravnborg
2009-06-09 23:27 ` Stephen Rothwell
2008-11-26 4:42 Stephen Rothwell
2008-11-26 21:06 ` Sam Ravnborg
2008-11-26 23:49 ` Stephen Rothwell
2008-12-03 0:36 ` Stephen Rothwell
2008-12-03 9:46 ` Sam Ravnborg
2008-11-25 4:47 Stephen Rothwell
2008-11-25 8:42 ` Sam Ravnborg
2008-11-25 8:58 ` Stephen Rothwell
2008-07-07 8:40 Stephen Rothwell
2008-07-07 12:51 ` Sam Ravnborg
2008-07-07 13:08 ` Stephen Rothwell
2008-07-07 16:13 ` Roman Zippel
2008-07-07 21:01 ` Sam Ravnborg
2008-07-07 23:36 ` Michael Ellerman
2008-07-08 2:55 ` Roman Zippel
2008-07-10 0:51 ` Michael Ellerman
2008-07-10 14:59 ` Roman Zippel
2008-07-08 21:19 ` Sam Ravnborg
2008-07-10 14:52 ` Roman Zippel
2008-07-25 4:13 ` Stephen Rothwell
2008-07-26 10:06 ` Sam Ravnborg
2008-07-26 12:40 ` Stephen Rothwell
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=20090505064317.GA14708@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=jbeulich@novell.com \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=swhiteho@redhat.com \
/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).