summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlie Halip <ilie.halip@gmail.com>2019-09-20 18:39:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-09-02 09:19:18 +0200
commitb29a10fd0734b92adec2bbfb2fa8e8c42a55d330 (patch)
tree36123aac42bf5ea027acf05683ac6efd47165831
parent5eb967dd50a5a29952ab6e6b1ef4bf216cf1652c (diff)
powerpc/pmac/smp: Avoid unused-variable warnings
commit 9451c79bc39e610882bdd12370f01af5004a3c4f upstream. 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@gmail.com> Signed-off-by: Ilie Halip <ilie.halip@gmail.com> [mpe: Move them into core99_init_caches() which is their only user] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190920153951.25762-1-ilie.halip@gmail.com Cc: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/powerpc/platforms/powermac/smp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index f95fbdee6efe..4a2a1b2529b3 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -660,13 +660,13 @@ 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
+ /* 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;
+
if (!cpu_has_feature(CPU_FTR_L2CR))
return;