Skip to contentSkip to conversation

ARM: imx53: mark imx53_dt_board_compat as const

PATCH New Lucas Stach 2 participants 2 messages Jun 30, 2014 – Jul 1, 2014

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

PATCH 1/1 ARM: imx53: mark imx53_dt_board_compat as const

Otherwise GCC will mark the .init.rodata section R/W, which causes a compile error once we add other real R/O data, which happens with patch "ARM: imx53: globally disable supervisor protect".

---
 arch/arm/mach-imx/mach-imx53.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/mach-imx53.c +1 -1
index d757d8cbebd1..c3a404ce39e6 100644
@@ -45,7 +45,7 @@ static void __init imx53_dt_init(void)
 	}
 }
 
-static const char *imx53_dt_board_compat[] __initconst = {
+static const char * const imx53_dt_board_compat[] __initconst = {
 	"fsl,imx53",
 	NULL
 };
Signature · 1 line
2.0.0
#1 lore raw

PATCH 1/1 ARM: imx53: mark imx53_dt_board_compat as const

Quoted 6 lines · Lucas Stach

Otherwise GCC will mark the .init.rodata section R/W, which causes a compile error once we add other real R/O data, which happens with patch "ARM: imx53: globally disable supervisor protect".

The same change needs to be applied on some other IMX platforms, so I just send a new patch based on this.

Shawn

Quoted 20 lines
---
 arch/arm/mach-imx/mach-imx53.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/mach-imx53.c +1 -1
index d757d8cbebd1..c3a404ce39e6 100644
@@ -45,7 +45,7 @@ static void __init imx53_dt_init(void)
 	}
 }
 
-static const char *imx53_dt_board_compat[] __initconst = {
+static const char * const imx53_dt_board_compat[] __initconst = {
 	"fsl,imx53",
 	NULL
 };
Signature · 1 line
2.0.0