All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "David S. Miller" <davem@davemloft.net>
Cc: linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ide: icside: remove incorrect initconst annotation
Date: Mon,  8 Feb 2016 15:31:45 +0100	[thread overview]
Message-ID: <1454941909-2778808-1-git-send-email-arnd@arndb.de> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ide: icside: remove incorrect initconst annotation
Date: Mon,  8 Feb 2016 15:31:45 +0100	[thread overview]
Message-ID: <1454941909-2778808-1-git-send-email-arnd@arndb.de> (raw)

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

             reply	other threads:[~2016-02-08 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 14:31 Arnd Bergmann [this message]
2016-02-08 14:31 ` [PATCH] ide: icside: remove incorrect initconst annotation Arnd Bergmann
2016-03-20 21:01 ` David Miller
2016-03-20 21:01   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454941909-2778808-1-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.