From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata
Date: Fri, 30 Mar 2012 11:50:24 +0200 [thread overview]
Message-ID: <20120330095024.GS15647@pengutronix.de> (raw)
In-Reply-To: <20120330061134.GD3254@S2101-09.ap.freescale.net>
Hello Shawn,
On Fri, Mar 30, 2012 at 02:11:36PM +0800, Shawn Guo wrote:
> On Thu, Mar 29, 2012 at 11:12:20PM +0200, Uwe Kleine-K?nig wrote:
> ...
> > diff --git a/arch/arm/mach-imx/imx51-dt.c b/arch/arm/mach-imx/imx51-dt.c
> > index 5cca573..7e00748 100644
> > --- a/arch/arm/mach-imx/imx51-dt.c
> > +++ b/arch/arm/mach-imx/imx51-dt.c
> > @@ -102,7 +102,7 @@ static struct sys_timer imx51_timer = {
> > .init = imx51_timer_init,
> > };
> >
> > -static const char *imx51_dt_board_compat[] __initdata = {
> > +static const char *imx51_dt_board_compat[] __initconst = {
> > "fsl,imx51-babbage",
> > "fsl,imx51",
> > NULL
>
> CC arch/arm/mach-imx/imx51-dt.o
> arch/arm/mach-imx/imx51-dt.c:105:20: error: imx51_dt_board_compat causes a section type conflict
> make[2]: *** [arch/arm/mach-imx/imx51-dt.o] Error 1
>
> I do not understand why though.
that's because the strings are constant, but the array is not. The fix
is:
-static const char *imx51_dt_board_compat[] __initconst = {
+static const char *const imx51_dt_board_compat[] __initconst = {
or keeping __initdata.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2012-03-30 9:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120329211131.GA31250@pengutronix.de>
2012-03-29 21:12 ` [PATCH 03/17] ARM: mark const init data with __initconst instead of __initdata Uwe Kleine-König
2012-03-29 22:31 ` David Brown
2012-03-30 4:34 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-30 6:11 ` Shawn Guo
2012-03-30 9:50 ` Uwe Kleine-König [this message]
2012-03-30 11:25 ` Shawn Guo
2012-03-30 16:11 ` Tony Lindgren
2012-03-29 21:12 ` [PATCH 14/17] media/video/s5p-tv: " Uwe Kleine-König
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=20120330095024.GS15647@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).