mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: clps711x: mark clps711x_compat as const
@ 2018-02-20 16:24 Arnd Bergmann
  2018-02-20 16:24 ` [PATCH 2/3] ARM: orion: mark orion_ge00_mvmdio_bus_name " Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Arnd Bergmann @ 2018-02-20 16:24 UTC (permalink / raw)
  To: arm, Alexander Shiyan, Arnd Bergmann; +Cc: linux-arm-kernel, linux-kernel

The array of string pointers is put in __initconst, and the strings themselves
are marke 'const' but the the pointers are not, which caused a warning when
built with LTO:

arch/arm/mach-clps711x/board-dt.c:72:20: error: 'clps711x_compat' causes a section type conflict with 'feroceon_ids'
 static const char *clps711x_compat[] __initconst = {

This marks the array itself const as well, which was certainly the
intention originally.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/mach-clps711x/board-dt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-clps711x/board-dt.c b/arch/arm/mach-clps711x/board-dt.c
index ee1f83b1a332..4c89a8e9a2e3 100644
--- a/arch/arm/mach-clps711x/board-dt.c
+++ b/arch/arm/mach-clps711x/board-dt.c
@@ -69,7 +69,7 @@ static void clps711x_restart(enum reboot_mode mode, const char *cmd)
 	soft_restart(0);
 }
 
-static const char *clps711x_compat[] __initconst = {
+static const char *const clps711x_compat[] __initconst = {
 	"cirrus,ep7209",
 	NULL
 };
-- 
2.9.0

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

end of thread, other threads:[~2018-02-23 10:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-20 16:24 [PATCH 1/3] ARM: clps711x: mark clps711x_compat as const Arnd Bergmann
2018-02-20 16:24 ` [PATCH 2/3] ARM: orion: mark orion_ge00_mvmdio_bus_name " Arnd Bergmann
2018-02-21  3:49   ` Andrew Lunn
2018-02-21 11:34     ` Arnd Bergmann
2018-02-20 16:24 ` [PATCH 3/3] ARM: davinci: mark spi_board_info arrays " Arnd Bergmann
2018-02-22 16:43   ` Arnd Bergmann
2018-02-23 10:00     ` Sekhar Nori
2018-02-22 16:43 ` [PATCH 1/3] ARM: clps711x: mark clps711x_compat " Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®