Skip to contentSkip to conversation

mach-imx/mach-imx6ul.c: proper constness with __initconst

PATCH New Nicolas Pitre 2 participants 2 messages Nov 22, 2015 – Nov 25, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mach-imx/mach-imx6ul.c: proper constness with __initconst

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.

arch/arm/mach-imx/mach-imx6ul.c +1 -1
index acaf7056ef..a38b16b699 100644
@@ -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,
 };
Applied
#1 lore raw

PATCH 1/1 mach-imx/mach-imx6ul.c: proper constness with __initconst

Quoted 5 lines · Nicolas Pitre

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.

Applied, thanks.