* [PATCH 1/2] soc/tegra: Restrict SoC device registration to Tegra
@ 2017-08-23 9:25 Thierry Reding
[not found] ` <20170823092509.5243-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2017-08-23 9:25 UTC (permalink / raw)
To: arm-DgEjT+Ai2ygdnm+yROfE0A
Cc: Arnd Bergmann, Sudeep Holla, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Commit 8a46828e623c ("soc/tegra: Register SoC device") added an initcall
to register the SoC device on Tegra. However, that code is unrestricted
and will run on all platforms, causing unwanted warnings.
Fix this by first checking that we're running on hardware that supports
the fuses block that we use to provide SoC information.
Fixes: 8a46828e623c ("soc/tegra: Register SoC device")
Reported-by: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>
Tested-by: Sudeep Holla <sudeep.holla-5wv7dgnIgG8@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/soc/tegra/fuse/fuse-tegra.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index e4f78de8f95f..be003d04383f 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -346,8 +346,16 @@ early_initcall(tegra_init_fuse);
#ifdef CONFIG_ARM64
static int __init tegra_init_soc(void)
{
+ struct device_node *np;
struct device *soc;
+ /* make sure we're running on Tegra */
+ np = of_find_matching_node(NULL, tegra_fuse_match);
+ if (!np)
+ return 0;
+
+ of_node_put(np);
+
soc = tegra_soc_device_register();
if (IS_ERR(soc)) {
pr_err("failed to register SoC device: %ld\n", PTR_ERR(soc));
--
2.13.3
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20170823092509.5243-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* [PATCH 2/2] soc/tegra: fuse: Add missing semi-colon [not found] ` <20170823092509.5243-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-08-23 9:25 ` Thierry Reding [not found] ` <20170823092509.5243-2-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Thierry Reding @ 2017-08-23 9:25 UTC (permalink / raw) To: arm-DgEjT+Ai2ygdnm+yROfE0A Cc: Arnd Bergmann, Sudeep Holla, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Commit 8a46828e623c ("soc/tegra: Register SoC device") added a new initcall, but forgot to terminate the line with a semi-colon. Some recent versions of GCC seem to report this as an error. Fixes: 8a46828e623c ("soc/tegra: Register SoC device") Reported-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- drivers/soc/tegra/fuse/fuse-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index be003d04383f..b7c552e3133c 100644 --- a/drivers/soc/tegra/fuse/fuse-tegra.c +++ b/drivers/soc/tegra/fuse/fuse-tegra.c @@ -364,5 +364,5 @@ static int __init tegra_init_soc(void) return 0; } -device_initcall(tegra_init_soc) +device_initcall(tegra_init_soc); #endif -- 2.13.3 ^ permalink raw reply related [flat|nested] 3+ messages in thread
[parent not found: <20170823092509.5243-2-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 2/2] soc/tegra: fuse: Add missing semi-colon [not found] ` <20170823092509.5243-2-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2017-08-23 9:55 ` Arnd Bergmann 0 siblings, 0 replies; 3+ messages in thread From: Arnd Bergmann @ 2017-08-23 9:55 UTC (permalink / raw) To: Thierry Reding Cc: arm-soc, Sudeep Holla, open list:TEGRA ARCHITECTURE SUPPORT, Linux ARM On Wed, Aug 23, 2017 at 11:25 AM, Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > Commit 8a46828e623c ("soc/tegra: Register SoC device") added a new > initcall, but forgot to terminate the line with a semi-colon. Some > recent versions of GCC seem to report this as an error. > > Fixes: 8a46828e623c ("soc/tegra: Register SoC device") > Reported-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> > Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Applied patches 1 and 2, thanks for addressing this so quickly! Arnd ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-23 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-23 9:25 [PATCH 1/2] soc/tegra: Restrict SoC device registration to Tegra Thierry Reding
[not found] ` <20170823092509.5243-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-23 9:25 ` [PATCH 2/2] soc/tegra: fuse: Add missing semi-colon Thierry Reding
[not found] ` <20170823092509.5243-2-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-23 9:55 ` Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox