All of lore.kernel.org
 help / color / mirror / Atom feed
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 1/2] powerpc: remove set but not used variable 'force_printk_to_btext'
Date: Thu, 8 Apr 2021 07:01:58 +0200	[thread overview]
Message-ID: <b7636590-42ef-e588-59e1-b0591243d619@csgroup.eu> (raw)
In-Reply-To: <20210408011801.557004-2-yukuai3@huawei.com>



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.

> 
> 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);
> 

  reply	other threads:[~2021-04-08  5:02 UTC|newest]

Thread overview: 14+ 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:17 ` 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  1:18   ` Yu Kuai
2021-04-08  5:01   ` Christophe Leroy [this message]
2021-04-08  9:30     ` yukuai (C)
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  1:18   ` Yu Kuai
2021-04-08  5:04   ` Christophe Leroy
2021-04-08  9:34     ` yukuai (C)
2021-04-08  9:34       ` yukuai (C)
2021-04-09 12:02     ` Segher Boessenkool
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=b7636590-42ef-e588-59e1-b0591243d619@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.