mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org
Cc: "H . Peter Anvin" <hpa@zytor.com>, Arnd Bergmann <arnd@arndb.de>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	clang-built-linux@googlegroups.com,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/cpu: remove needless definition for !CONFIG_X86_32
Date: Mon, 16 Nov 2020 07:27:11 -0800	[thread overview]
Message-ID: <ef9fc100-78f9-4b8a-7c28-d413db041c1d@redhat.com> (raw)
In-Reply-To: <20201116094218.10508-1-lukas.bulwahn@gmail.com>


On 11/16/20 1:42 AM, Lukas Bulwahn wrote:
> The function flag_is_changeable_p() is used in:
>
>   - have_cpuid_p() for its CONFIG_X86_32 definition
>   - identify_cpu_without_cpuid() within its CONFIG_X86_32 ifdef-block

This looks fine.

Reviewed-by: Tom Rix <trix@redhat.com>

a bit of cleanup, identify_cpu_without_cpuid() be moved into the main CONFIG_X86_32 ifdef with stub for x86_64.

>
> So, there is no need to define flag_is_changeable_p() if !CONFIG_X86_32.
> Simply remove this needless definition.
>
> This was discovered with make CC=clang W=1:
>
>   arch/x86/kernel/cpu/common.c:283:19:
>     warning: unused function 'flag_is_changeable_p' [-Wunused-function]
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> ---
> applies cleanly on current master and next-20201116
>
> Thomas, Boris, please pick this minor non-urgent patch.
>
>  arch/x86/kernel/cpu/common.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 35ad8480c464..b89dbc7ccb0c 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -280,10 +280,6 @@ static int __init x86_serial_nr_setup(char *s)
>  }
>  __setup("serialnumber", x86_serial_nr_setup);
>  #else
> -static inline int flag_is_changeable_p(u32 flag)
> -{
> -	return 1;
> -}
>  static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
>  {
>  }


      reply	other threads:[~2020-11-16 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16  9:42 Lukas Bulwahn
2020-11-16 15:27 ` Tom Rix [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=ef9fc100-78f9-4b8a-7c28-d413db041c1d@redhat.com \
    --to=trix@redhat.com \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hpa@zytor.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=mingo@redhat.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®