From: Ralf Baechle <ralf@linux-mips.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
perex@suse.cz, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org
Subject: Re: [SOUND] hda_intel: build fix
Date: Mon, 12 Mar 2007 13:53:51 +0000 [thread overview]
Message-ID: <20070312135351.GA11974@linux-mips.org> (raw)
In-Reply-To: <s5h8xe2soxt.wl%tiwai@suse.de>
On Mon, Mar 12, 2007 at 12:04:30PM +0100, Takashi Iwai wrote:
> It's no big problem to remove const in these cases, but allowing const
> with __devinitdata seems the right fix to me...
Gccs derives the readability of a section used with __attribute(section())
from the first use, which in case of this driver was a non-const use, so
gcc made .init.data a r/w section. Later uses were marked with const,
so did conflict. Having to ensure that all members of a section are const
or are not const is painful, so this is clearly less than desirable
behaviour on gcc's side. I think gcc picking the most permissive
attributes for a section, that is r/w in this case would be far preferable.
Here is a small test case btw:
int foo __attribute__ ((__section__ (".init.data"))) = 23;
const int bar __attribute__ ((__section__ (".init.data"))) = 42;
Now I'm not a great fan of the patch I've posted but it reflects what real
world gcc is doing so for the time being I don't see much of a chance to
The Right Thing (TM). And the gain from const in this case will be small
anyway.
Ralf
next prev parent reply other threads:[~2007-03-12 13:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-10 19:05 Ralf Baechle
2007-03-10 19:26 ` [SOUND] ice1712: build fixes Ralf Baechle
2007-03-10 19:27 ` Ralf Baechle
2007-03-10 19:35 ` Ralf Baechle
2007-03-12 11:04 ` [SOUND] hda_intel: build fix Takashi Iwai
2007-03-12 13:53 ` Ralf Baechle [this message]
2007-03-12 14:43 ` Takashi Iwai
2007-03-12 15:46 ` Ralf Baechle
2007-03-12 16:38 ` Takashi Iwai
2007-03-13 12:42 ` Ralf Baechle
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=20070312135351.GA11974@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=akpm@linux-foundation.org \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@suse.cz \
--cc=tiwai@suse.de \
/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
Powered by JetHome