[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <310993b1-9293-f64c-ac4b-73ed8fd73aae@csgroup.eu>
Date: Thu, 3 Nov 2022 07:38:38 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Chen Lifu <chenlifu@...wei.com>,
"benh@...nel.crashing.org" <benh@...nel.crashing.org>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"npiggin@...il.com" <npiggin@...il.com>,
"nick.child@....com" <nick.child@....com>,
"zhengzucheng@...wei.com" <zhengzucheng@...wei.com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 -next] powerpc/powermac: Fix symbol not declared
warnings
Le 03/11/2022 à 08:01, Chen Lifu a écrit :
> 1. ppc_override_l2cr and ppc_override_l2cr_value are only used in
> l2cr_init() function, remove them and used *l2cr directly.
> 2. has_l2cache is not used outside of the file, so mark it static and
> do not initialise statics to 0.
>
> Fixes the following warning:
>
> arch/powerpc/platforms/powermac/setup.c:73:5: warning: symbol
> 'ppc_override_l2cr' was not declared. Should it be static?
> arch/powerpc/platforms/powermac/setup.c:74:5: warning: symbol
> 'ppc_override_l2cr_value' was not declared. Should it be static?
> arch/powerpc/platforms/powermac/setup.c:75:5: warning: symbol
> 'has_l2cache' was not declared. Should it be static?
>
> Signed-off-by: Chen Lifu <chenlifu@...wei.com>
Reviewed-by: Christophe Leroy <christophe.leroy@...roup.eu>
> ---
> arch/powerpc/platforms/powermac/setup.c | 19 ++++++-------------
> 1 file changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
> index 04daa7f0a03c..cb9a3290849a 100644
> --- a/arch/powerpc/platforms/powermac/setup.c
> +++ b/arch/powerpc/platforms/powermac/setup.c
> @@ -68,13 +68,11 @@
>
> #include "pmac.h"
>
> #undef SHOW_GATWICK_IRQS
>
> -int ppc_override_l2cr = 0;
> -int ppc_override_l2cr_value;
> -int has_l2cache = 0;
> +static int has_l2cache;
>
> int pmac_newworld;
>
> static int current_root_goodness = -1;
>
> @@ -234,26 +232,21 @@ static void __init l2cr_init(void)
>
> for_each_of_cpu_node(np) {
> const unsigned int *l2cr =
> of_get_property(np, "l2cr-value", NULL);
> if (l2cr) {
> - ppc_override_l2cr = 1;
> - ppc_override_l2cr_value = *l2cr;
> _set_L2CR(0);
> - _set_L2CR(ppc_override_l2cr_value);
> + _set_L2CR(*l2cr);
> + pr_info("L2CR overridden (0x%x), "
> + "backside cache is %s\n",
> + *l2cr, ((*l2cr) & 0x80000000) ?
> + "enabled" : "disabled");
> }
> of_node_put(np);
> break;
> }
> }
> -
> - if (ppc_override_l2cr)
> - printk(KERN_INFO "L2CR overridden (0x%x), "
> - "backside cache is %s\n",
> - ppc_override_l2cr_value,
> - (ppc_override_l2cr_value & 0x80000000)
> - ? "enabled" : "disabled");
> }
> #endif
>
> static void __init pmac_setup_arch(void)
> {
Powered by blists - more mailing lists