From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
kernel@pengutronix.de, Andrew Victor <linux@maxim.org.za>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Russell King <linux@arm.linux.org.uk>,
Sekhar Nori <nsekhar@ti.com>, Kevin Hilman <khilman@ti.com>,
Kukjin Kim <kgene.kim@samsung.com>,
Lennert Buytenhek <kernel@wantstofly.org>,
Nicolas Pitre <nico@fluxnic.net>,
Eric Miao <eric.y.miao@gmail.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
David Brown <davidb@codeaurora.org>,
Daniel Walker <dwalker@fifo99.com>,
Bryan Huntsman <bryanh@codeaurora.org>,
Tony Lindgren <tony@atomide.com>,
Barry Song <baohua.song@csr.com>, Andrew Lunn <andrew@lunn.ch>,
Lucas De Marchi <lucas.demarchi@profusion.mobi>,
linux-arm-kernel@lists.infradead.org,
davinci-linux-open-source@linux.davincidsp.com, linux-sa
Subject: Re: [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: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 21:11 [PATCH 00/17] mark const init data with __initconst instead of __initdata Uwe Kleine-König
2012-03-29 21:12 ` [PATCH 03/17] ARM: " 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-30 9:59 ` [PATCH 00/17] " Uwe Kleine-König
2012-03-30 20:03 ` [PATCH v2 00/15] " Uwe Kleine-König
2012-03-30 20:04 ` [PATCH v2 02/15] ARM: " Uwe Kleine-König
2012-04-11 11:34 ` Sekhar Nori
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=akpm@linux-foundation.org \
--cc=andrew@lunn.ch \
--cc=baohua.song@csr.com \
--cc=bryanh@codeaurora.org \
--cc=davidb@codeaurora.org \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=dwalker@fifo99.com \
--cc=eric.y.miao@gmail.com \
--cc=haojian.zhuang@gmail.com \
--cc=kernel@pengutronix.de \
--cc=kernel@wantstofly.org \
--cc=kgene.kim@samsung.com \
--cc=khilman@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linux@maxim.org.za \
--cc=lucas.demarchi@profusion.mobi \
--cc=nico@fluxnic.net \
--cc=nicolas.ferre@atmel.com \
--cc=nsekhar@ti.com \
--cc=plagnioj@jcrosoft.com \
--cc=shawn.guo@linaro.org \
--cc=tony@atomide.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).