From: "yukuai (C)" <yukuai3@huawei.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>, <mpe@ellerman.id.au>
Cc: <linuxppc-dev@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>,
<yi.zhang@huawei.com>
Subject: Re: [PATCH 1/2] powerpc: remove set but not used variable 'force_printk_to_btext'
Date: Thu, 8 Apr 2021 17:30:24 +0800 [thread overview]
Message-ID: <9e3e5a40-ff90-9872-30a5-3a65232d5f0e@huawei.com> (raw)
In-Reply-To: <b7636590-42ef-e588-59e1-b0591243d619@csgroup.eu>
On 2021/04/08 13:01, Christophe Leroy wrote:
>
>
> Le 08/04/2021 à 03:18, Yu Kuai a écrit :
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> arch/powerpc/kernel/btext.c:49:12: error: 'force_printk_to_btext'
>> defined but not used.
>
> You don't get this error as it is now.
> You will get this error only if you make it 'static', which is what you
> did in your first patch based on the 'sparse' report.
>
> When removing a non static variable, you should explain that you can
> remove it after you have verifier that it is nowhere used, neither in
> that file nor in any other one.
Hi,
I do use 'git grep force_printk_to_btext' to confirm that
'force_printk_to_btext' is not used anywhere. Maybe it's better to
metion it in commit message?
Thanks
Yu Kuai
>
>>
>> It is never used, and so can be removed.
>>
>> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
>> ---
>> arch/powerpc/kernel/btext.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
>> index 803c2a45b22a..359d0f4ca532 100644
>> --- a/arch/powerpc/kernel/btext.c
>> +++ b/arch/powerpc/kernel/btext.c
>> @@ -46,7 +46,6 @@ unsigned long disp_BAT[2] __initdata = {0, 0};
>> static unsigned char vga_font[cmapsz];
>> int boot_text_mapped __force_data = 0;
>> -int force_printk_to_btext = 0;
>> extern void rmci_on(void);
>> extern void rmci_off(void);
>>
> .
>
next prev parent reply other threads:[~2021-04-08 9:30 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) [this message]
2021-04-08 1:18 ` [PATCH 2/2] powerpc: make 'boot_text_mapped' static Yu Kuai
2021-04-08 5:04 ` Christophe Leroy
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=9e3e5a40-ff90-9872-30a5-3a65232d5f0e@huawei.com \
--to=yukuai3@huawei.com \
--cc=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 \
/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).