linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mach-imx/mach-imx6ul.c: proper constness with __initconst
@ 2015-11-22  1:35 Nicolas Pitre
  2015-11-25  3:07 ` Shawn Guo
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Pitre @ 2015-11-22  1:35 UTC (permalink / raw)
  To: linux-arm-kernel

Both the pointer array and the pointed data have to be const when using
__initconst to be correct.  This also fixes LTO builds that otherwise 
fail with section mismatch errors.

Signed-off-by: Nicolas Pitre <nico@linaro.org>

diff --git a/arch/arm/mach-imx/mach-imx6ul.c b/arch/arm/mach-imx/mach-imx6ul.c
index acaf7056ef..a38b16b699 100644
--- a/arch/arm/mach-imx/mach-imx6ul.c
+++ b/arch/arm/mach-imx/mach-imx6ul.c
@@ -84,7 +84,7 @@ static void __init imx6ul_init_late(void)
 		platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
 }
 
-static const char *imx6ul_dt_compat[] __initconst = {
+static const char * const imx6ul_dt_compat[] __initconst = {
 	"fsl,imx6ul",
 	NULL,
 };

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

* [PATCH] mach-imx/mach-imx6ul.c: proper constness with __initconst
  2015-11-22  1:35 [PATCH] mach-imx/mach-imx6ul.c: proper constness with __initconst Nicolas Pitre
@ 2015-11-25  3:07 ` Shawn Guo
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn Guo @ 2015-11-25  3:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Nov 21, 2015 at 08:35:31PM -0500, Nicolas Pitre wrote:
> Both the pointer array and the pointed data have to be const when using
> __initconst to be correct.  This also fixes LTO builds that otherwise 
> fail with section mismatch errors.
> 
> Signed-off-by: Nicolas Pitre <nico@linaro.org>

Applied, thanks.

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

end of thread, other threads:[~2015-11-25  3:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-22  1:35 [PATCH] mach-imx/mach-imx6ul.c: proper constness with __initconst Nicolas Pitre
2015-11-25  3:07 ` Shawn Guo

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