LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Kurtz <djkurtz@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Matthias Kaehlcke <mka@chromium.org>,
Guenter Roeck <groeck@chromium.org>
Cc: adurbin@chromium.org, linux-kernel@vger.kernel.org,
Daniel Kurtz <djkurtz@chromium.org>, Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org (open list:SERIAL DRIVERS)
Subject: [PATCH v2 1/2] serial: sh-sci: Remove __initdata attribute for struct 'port_cfg'
Date: Tue, 20 Mar 2018 11:57:11 -0600 [thread overview]
Message-ID: <20180320175712.201572-2-djkurtz@chromium.org> (raw)
In-Reply-To: <20180320175712.201572-1-djkurtz@chromium.org>
Commit dd076cffb8cd ("serial: sh-sci: Fix init data attribute for struct
'port_cfg'") properly removed the __init attribute, and changed it to
__initdata.
The __init function early_console_setup() takes the address of global
port_cfg and assigns it to a field in another global, sci_ports:
static int __init early_console_setup(struct earlycon_device *device,
int type)
{
...
port_cfg.type = type;
sci_ports[0].cfg = &port_cfg;
...
}
port_cfg, however, is now in __initdata:
static struct plat_sci_port port_cfg __initdata;
... but sci_ports is not:
static struct sci_port sci_ports[SCI_NPORTS];
Thus, there is a non-__initdata variable containing the address of a
__initdata struct.
Fix this section type conflict by just removing the __initdata attribute.
Fixes: dd076cffb8cd ("serial: sh-sci: Fix init data attribute for struct 'port_cfg'")
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
drivers/tty/serial/sh-sci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 44adf9db38f8..ff4e1012ed76 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3277,7 +3277,7 @@ early_platform_init_buffer("earlyprintk", &sci_driver,
early_serial_buf, ARRAY_SIZE(early_serial_buf));
#endif
#ifdef CONFIG_SERIAL_SH_SCI_EARLYCON
-static struct plat_sci_port port_cfg __initdata;
+static struct plat_sci_port port_cfg;
static int __init early_console_setup(struct earlycon_device *device,
int type)
--
2.16.2.804.g6dcf76e118-goog
next prev parent reply other threads:[~2018-03-20 17:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 17:57 [PATCH v2 0/2] Fix __earlycon_table stride... again Daniel Kurtz
2018-03-20 17:57 ` Daniel Kurtz [this message]
2018-03-20 17:57 ` [PATCH v2 2/2] earlycon: Use a pointer table to fix __earlycon_table stride Daniel Kurtz
2018-03-20 18:19 ` Guenter Roeck
2018-03-23 2:54 ` kbuild test robot
2018-03-23 13:34 ` [PATCH v2 0/2] Fix __earlycon_table stride... again Greg Kroah-Hartman
2018-03-24 4:49 ` Daniel Kurtz
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=20180320175712.201572-2-djkurtz@chromium.org \
--to=djkurtz@chromium.org \
--cc=adurbin@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=groeck@chromium.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mka@chromium.org \
--subject='Re: [PATCH v2 1/2] serial: sh-sci: Remove __initdata attribute for struct '\''port_cfg'\''' \
/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
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).