[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190920153951.25762-1-ilie.halip@gmail.com>
Date: Fri, 20 Sep 2019 18:39:51 +0300
From: Ilie Halip <ilie.halip@...il.com>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: Nathan Chancellor <natechancellor@...il.com>,
clang-built-linux@...glegroups.com,
Ilie Halip <ilie.halip@...il.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH] powerpc/pmac/smp: avoid unused-variable warnings
When building with ppc64_defconfig, the compiler reports
that these 2 variables are not used:
warning: unused variable 'core99_l2_cache' [-Wunused-variable]
warning: unused variable 'core99_l3_cache' [-Wunused-variable]
They are only used when CONFIG_PPC64 is not defined. Move
them into a section which does the same macro check.
Reported-by: Nathan Chancellor <natechancellor@...il.com>
Signed-off-by: Ilie Halip <ilie.halip@...il.com>
---
arch/powerpc/platforms/powermac/smp.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index f95fbdee6efe..e44c606f119e 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -648,6 +648,10 @@ static void smp_core99_pfunc_tb_freeze(int freeze)
static unsigned int core99_tb_gpio; /* Timebase freeze GPIO */
+/* L2 and L3 cache settings to pass from CPU0 to CPU1 on G4 cpus */
+volatile static long int core99_l2_cache;
+volatile static long int core99_l3_cache;
+
static void smp_core99_gpio_tb_freeze(int freeze)
{
if (freeze)
@@ -660,10 +664,6 @@ static void smp_core99_gpio_tb_freeze(int freeze)
#endif /* !CONFIG_PPC64 */
-/* L2 and L3 cache settings to pass from CPU0 to CPU1 on G4 cpus */
-volatile static long int core99_l2_cache;
-volatile static long int core99_l3_cache;
-
static void core99_init_caches(int cpu)
{
#ifndef CONFIG_PPC64
--
2.17.1
Powered by blists - more mailing lists