[PATCH] mach-shmobile/setup-r8a7793.c: proper constness with __initconst
Nicolas Pitre
nicolas.pitre at linaro.org
Sat Nov 21 17:41:07 PST 2015
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 at linaro.org>
diff --git a/arch/arm/mach-shmobile/setup-r8a7793.c b/arch/arm/mach-shmobile/setup-r8a7793.c
index 1d2825cb7a..5fce87f7f2 100644
--- a/arch/arm/mach-shmobile/setup-r8a7793.c
+++ b/arch/arm/mach-shmobile/setup-r8a7793.c
@@ -19,7 +19,7 @@
#include "common.h"
#include "rcar-gen2.h"
-static const char *r8a7793_boards_compat_dt[] __initconst = {
+static const char * const r8a7793_boards_compat_dt[] __initconst = {
"renesas,r8a7793",
NULL,
};
More information about the linux-arm-kernel
mailing list