From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Jason Wang <wangborong@cdjrlc.com>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] MIPS: tools: no need to initialise statics to 0
Date: Thu, 12 May 2022 18:09:09 +0200 [thread overview]
Message-ID: <20220512160909.GC14475@alpha.franken.de> (raw)
In-Reply-To: <20220508023146.100385-1-wangborong@cdjrlc.com>
On Sun, May 08, 2022 at 10:31:46AM +0800, Jason Wang wrote:
> Static variables do not need to be initialised to 0, because compiler
> will initialise all uninitialised statics to 0. Thus, remove the
> unneeded initializations.
>
> Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
> ---
> arch/mips/boot/tools/relocs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/boot/tools/relocs.c b/arch/mips/boot/tools/relocs.c
> index 1bf53f3524b3..02fc85f3e8ff 100644
> --- a/arch/mips/boot/tools/relocs.c
> +++ b/arch/mips/boot/tools/relocs.c
> @@ -351,7 +351,7 @@ static void read_symtabs(FILE *fp)
>
> static void read_relocs(FILE *fp)
> {
> - static unsigned long base = 0;
> + static unsigned long base;
> int i, j;
>
> if (!base) {
> --
> 2.35.1
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
prev parent reply other threads:[~2022-05-12 16:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-08 2:31 [PATCH] MIPS: tools: no need to initialise statics to 0 Jason Wang
2022-05-12 16:09 ` Thomas Bogendoerfer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220512160909.GC14475@alpha.franken.de \
--to=tsbogend@alpha.franken.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=wangborong@cdjrlc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox