From: Sudeep Holla <sudeep.holla@arm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org, Scott Wood <oss@buserror.net>,
Yangbo Lu <yangbo.lu@nxp.com>, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 2/2] soc: fsl: fix section mismatch build warnings
Date: Wed, 16 Nov 2016 16:39:27 +0000 [thread overview]
Message-ID: <1479314367-9169-2-git-send-email-sudeep.holla@arm.com> (raw)
In-Reply-To: <1479314367-9169-1-git-send-email-sudeep.holla@arm.com>
We get the following warning with the driver is compiled in:
WARNING: modpost: Found 1 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
With CONFIG_DEBUG_SECTION_MISMATCH enabled, the details are reported:
WARNING: vmlinux.o(.text+0x55d014): Section mismatch in reference from the
function fsl_guts_probe() to the function
.init.text:of_flat_dt_get_machine_name()
The function fsl_guts_probe() references
the function __init of_flat_dt_get_machine_name().
This is often because fsl_guts_probe lacks a __init
annotation or the annotation of of_flat_dt_get_machine_name is wrong.
This patch stashes the machine name during fsl_guts_init initcall to
fix the above warnings.
Cc: Scott Wood <oss@buserror.net>
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/soc/fsl/guts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/guts.c b/drivers/soc/fsl/guts.c
index 885409d84eb2..5513a2b3448f 100644
--- a/drivers/soc/fsl/guts.c
+++ b/drivers/soc/fsl/guts.c
@@ -31,6 +31,7 @@ struct fsl_soc_die_attr {
static struct guts *guts;
static struct soc_device_attribute soc_dev_attr;
static struct soc_device *soc_dev;
+static const char *machine;
/* SoC die attribute definition for QorIQ platform */
@@ -135,7 +136,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct resource *res;
const struct fsl_soc_die_attr *soc_die;
- const char *machine;
u32 svr;
/* Initialize guts */
@@ -151,7 +151,6 @@ static int fsl_guts_probe(struct platform_device *pdev)
return PTR_ERR(guts->regs);
/* Register soc device */
- machine = of_flat_dt_get_machine_name();
if (machine)
soc_dev_attr.machine = devm_kstrdup(dev, machine, GFP_KERNEL);
@@ -223,6 +222,7 @@ static struct platform_driver fsl_guts_driver = {
static int __init fsl_guts_init(void)
{
+ machine = of_flat_dt_get_machine_name();
return platform_driver_register(&fsl_guts_driver);
}
core_initcall(fsl_guts_init);
--
2.7.4
next prev parent reply other threads:[~2016-11-16 16:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 16:39 [PATCH 1/2] soc: fsl: make it explicitly non-modular Sudeep Holla
2016-11-16 16:39 ` Sudeep Holla [this message]
2016-11-16 17:07 ` [PATCH 2/2] soc: fsl: fix section mismatch build warnings Arnd Bergmann
2016-11-16 17:10 ` Sudeep Holla
2016-11-17 15:11 ` [PATCH v2 -next] " Sudeep Holla
2016-11-17 15:25 ` Arnd Bergmann
2016-11-18 14:30 ` Ulf Hansson
2016-11-16 16:41 ` [PATCH 1/2] soc: fsl: make it explicitly non-modular Sudeep Holla
2016-11-17 11:48 ` Sudeep Holla
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=1479314367-9169-2-git-send-email-sudeep.holla@arm.com \
--to=sudeep.holla@arm.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=oss@buserror.net \
--cc=yangbo.lu@nxp.com \
/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 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).