[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220723133405.GF17705@kitsune.suse.cz>
Date: Sat, 23 Jul 2022 15:34:05 +0200
From: Michal Suchánek <msuchanek@...e.de>
To: Jason Wang <wangborong@...rlc.com>
Cc: paulus@...ba.org, lkp@...el.com, linux-kernel@...r.kernel.org,
npiggin@...il.com, Julia.Lawall@...ia.fr, joel@....id.au,
linuxppc-dev@...ts.ozlabs.org, hbathini@...ux.ibm.com
Subject: Re: [PATCH] powerpc: Remove the static variable initialisations to 0
Hello,
On Sat, Jul 23, 2022 at 05:24:36PM +0800, Jason Wang wrote:
> Initialise global and static variable to 0 is always unnecessary.
> Remove the unnecessary initialisations.
Isn't this change also unnecessary?
Initializing to 0 does not affect correctness, or even any kind of
semantics in any way.
The current code is slightly easier to understand.
And changing the code introduces history noise for na gain.
Thanks
Michal
>
> Signed-off-by: Jason Wang <wangborong@...rlc.com>
> ---
> arch/powerpc/kexec/core_64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c
> index c2bea9db1c1e..2407214e3f41 100644
> --- a/arch/powerpc/kexec/core_64.c
> +++ b/arch/powerpc/kexec/core_64.c
> @@ -135,7 +135,7 @@ notrace void kexec_copy_flush(struct kimage *image)
>
> #ifdef CONFIG_SMP
>
> -static int kexec_all_irq_disabled = 0;
> +static int kexec_all_irq_disabled;
>
> static void kexec_smp_down(void *arg)
> {
> --
> 2.35.1
>
Powered by blists - more mailing lists