From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Yu Kuai <yukuai3@huawei.com>, mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
yi.zhang@huawei.com
Subject: Re: [PATCH 2/2] powerpc: make 'boot_text_mapped' static
Date: Thu, 8 Apr 2021 07:04:35 +0200 [thread overview]
Message-ID: <5b91cd3f-d171-f510-7dae-8cbabb13b23c@csgroup.eu> (raw)
In-Reply-To: <20210408011801.557004-3-yukuai3@huawei.com>
Le 08/04/2021 à 03:18, Yu Kuai a écrit :
> The sparse tool complains as follow:
>
> arch/powerpc/kernel/btext.c:48:5: warning:
> symbol 'boot_text_mapped' was not declared. Should it be static?
>
> This symbol is not used outside of btext.c, so this commit make
> it static.
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
> arch/powerpc/kernel/btext.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
> index 359d0f4ca532..8df9230be6fa 100644
> --- a/arch/powerpc/kernel/btext.c
> +++ b/arch/powerpc/kernel/btext.c
> @@ -45,7 +45,7 @@ unsigned long disp_BAT[2] __initdata = {0, 0};
>
> static unsigned char vga_font[cmapsz];
>
> -int boot_text_mapped __force_data = 0;
> +static int boot_text_mapped __force_data;
Are you sure the initialisation to 0 can be removed ? Usually initialisation to 0 is not needed
because not initialised variables go in the BSS section which is zeroed at startup. But here the
variable is flagged with __force_data so it is not going in the BSS section.
>
> extern void rmci_on(void);
> extern void rmci_off(void);
>
next prev parent reply other threads:[~2021-04-08 5:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-08 1:17 [PATCH 0/2] code optimizations for btext.c Yu Kuai
2021-04-08 1:18 ` [PATCH 1/2] powerpc: remove set but not used variable 'force_printk_to_btext' Yu Kuai
2021-04-08 5:01 ` Christophe Leroy
2021-04-08 9:30 ` yukuai (C)
2021-04-08 1:18 ` [PATCH 2/2] powerpc: make 'boot_text_mapped' static Yu Kuai
2021-04-08 5:04 ` Christophe Leroy [this message]
2021-04-08 9:34 ` yukuai (C)
2021-04-09 12:02 ` Segher Boessenkool
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=5b91cd3f-d171-f510-7dae-8cbabb13b23c@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.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;
as well as URLs for NNTP newsgroup(s).