linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ide: icside: remove incorrect initconst annotation
@ 2016-02-08 14:31 Arnd Bergmann
  2016-03-20 21:01 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-02-08 14:31 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-arm-kernel, Arnd Bergmann, linux-ide, linux-kernel

The icside_probe function can be called for hotplugged devices, so
its reference to the __initconst icside_v6_port_info variable
may be invalid, as Kbuild points out:

WARNING: drivers/ide/icside.o(.text+0x338): Section mismatch in reference from the function icside_probe()
 to the (unknown reference) .init.rodata:(unknown)

Interestingly, this problem only shows up with clang but not
with gcc, which optimizes out the __initconst variable.

This removes the incorrect annotation.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/ide/icside.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 9f0a48e39b8a..80e933b296f6 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -451,7 +451,7 @@ err_free:
 	return ret;
 }
 
-static const struct ide_port_info icside_v6_port_info __initconst = {
+static const struct ide_port_info icside_v6_port_info = {
 	.init_dma		= icside_dma_off_init,
 	.port_ops		= &icside_v6_no_dma_port_ops,
 	.host_flags		= IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
-- 
2.7.0

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

end of thread, other threads:[~2016-03-20 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 14:31 [PATCH] ide: icside: remove incorrect initconst annotation Arnd Bergmann
2016-03-20 21:01 ` David Miller

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