* [PATCH] powerpc/pmac/smp: avoid unused-variable warnings
@ 2019-09-20 15:39 Ilie Halip
2019-09-20 16:20 ` Nick Desaulniers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ilie Halip @ 2019-09-20 15:39 UTC (permalink / raw)
To: Michael Ellerman
Cc: Nathan Chancellor, clang-built-linux, Ilie Halip,
Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev,
linux-kernel
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>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pmac/smp: avoid unused-variable warnings
2019-09-20 15:39 [PATCH] powerpc/pmac/smp: avoid unused-variable warnings Ilie Halip
@ 2019-09-20 16:20 ` Nick Desaulniers
2019-09-20 17:17 ` Nathan Chancellor
2020-03-17 13:14 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2019-09-20 16:20 UTC (permalink / raw)
To: Ilie Halip
Cc: Michael Ellerman, Nathan Chancellor, clang-built-linux,
Benjamin Herrenschmidt, Paul Mackerras, linuxppc-dev, LKML
On Fri, Sep 20, 2019 at 8:41 AM Ilie Halip <ilie.halip@gmail.com> wrote:
>
> 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>
Hi Ilie, thanks for the patch. LGTM (Please include link tags if your
link addresses a bug in our bug tracker; it helps us track where/when
patches land, in case they need to be backported).
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/663
> ---
> 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
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/20190920153951.25762-1-ilie.halip%40gmail.com.
--
Thanks,
~Nick Desaulniers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pmac/smp: avoid unused-variable warnings
2019-09-20 15:39 [PATCH] powerpc/pmac/smp: avoid unused-variable warnings Ilie Halip
2019-09-20 16:20 ` Nick Desaulniers
@ 2019-09-20 17:17 ` Nathan Chancellor
2020-03-17 13:14 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2019-09-20 17:17 UTC (permalink / raw)
To: Ilie Halip
Cc: Michael Ellerman, clang-built-linux, Benjamin Herrenschmidt,
Paul Mackerras, linuxppc-dev, linux-kernel
On Fri, Sep 20, 2019 at 06:39:51PM +0300, Ilie Halip wrote:
> 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>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/pmac/smp: avoid unused-variable warnings
2019-09-20 15:39 [PATCH] powerpc/pmac/smp: avoid unused-variable warnings Ilie Halip
2019-09-20 16:20 ` Nick Desaulniers
2019-09-20 17:17 ` Nathan Chancellor
@ 2020-03-17 13:14 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2020-03-17 13:14 UTC (permalink / raw)
To: Ilie Halip
Cc: Ilie Halip, linux-kernel, clang-built-linux, Paul Mackerras,
Nathan Chancellor, linuxppc-dev
On Fri, 2019-09-20 at 15:39:51 UTC, Ilie Halip wrote:
> 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>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/9451c79bc39e610882bdd12370f01af5004a3c4f
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-17 13:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-20 15:39 [PATCH] powerpc/pmac/smp: avoid unused-variable warnings Ilie Halip
2019-09-20 16:20 ` Nick Desaulniers
2019-09-20 17:17 ` Nathan Chancellor
2020-03-17 13:14 ` Michael Ellerman
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).