Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1340607 > unrolled thread

[PATCH] ARM: realview: hide unused 'pmu_device' object

Started byArnd Bergmann <arnd@arndb.de>
First post2016-02-23 14:40 +0100
Last post2016-02-23 14:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: realview: hide unused 'pmu_device' object Arnd Bergmann <arnd@arndb.de> - 2016-02-23 14:40 +0100
    Re: [PATCH] ARM: realview: hide unused 'pmu_device' object Linus Walleij <linus.walleij@linaro.org> - 2016-02-23 14:40 +0100

#1340607 — [PATCH] ARM: realview: hide unused 'pmu_device' object

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-23 14:40 +0100
Subject[PATCH] ARM: realview: hide unused 'pmu_device' object
Message-ID<r5lm2-65T-15@gated-at.bofh.it>
The pmu_device is only accessed when CACHE_L2X0 is enabled,
and we get a warning otherwise:

mach-realview/realview_pbx.c:274:31: error: 'pmu_device' defined but not used [-Werror=unused-variable]

This adds another #ifdef for it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Linus, I'm not sure how long you plan to keep the board file around,
so just ignore the patch if this is getting deleted anyway, otherwise
it would be nice if you could add the patch to your series.

 arch/arm/mach-realview/realview_pbx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index b9f0757787ac..be1cec5fe3ad 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -248,6 +248,7 @@ static struct resource realview_pbx_isp1761_resources[] = {
 	},
 };
 
+#ifdef CONFIG_CACHE_L2X0
 static struct resource pmu_resources[] = {
 	[0] = {
 		.start		= IRQ_PBX_PMU_CPU0,
@@ -277,6 +278,7 @@ static struct platform_device pmu_device = {
 	.num_resources		= ARRAY_SIZE(pmu_resources),
 	.resource		= pmu_resources,
 };
+#endif
 
 static void __init gic_init_irq(void)
 {
-- 
2.7.0

[toc] | [next] | [standalone]


#1340610

FromLinus Walleij <linus.walleij@linaro.org>
Date2016-02-23 14:40 +0100
Message-ID<r5lm3-65T-43@gated-at.bofh.it>
In reply to#1340607
On Tue, Feb 23, 2016 at 2:35 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> The pmu_device is only accessed when CACHE_L2X0 is enabled,
> and we get a warning otherwise:
>
> mach-realview/realview_pbx.c:274:31: error: 'pmu_device' defined but not used [-Werror=unused-variable]
>
> This adds another #ifdef for it.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> Linus, I'm not sure how long you plan to keep the board file around,
> so just ignore the patch if this is getting deleted anyway, otherwise
> it would be nice if you could add the patch to your series.

I'll queue it in the bottom of my stack, it doesn't hurt.

I'm working on DTSes for the PBX as we speak.

Yours,
Linus Walleij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web