From: Alexandre Chartre <alexandre.chartre@oracle.com>
To: Daniel Sneddon <daniel.sneddon@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Cc: Sean Christopherson <seanjc@google.com>,
"H. Peter Anvin" <hpa@zytor.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/bugs: Fix return type of spectre_bhi_state()
Date: Wed, 10 Apr 2024 10:45:50 +0200 [thread overview]
Message-ID: <c0bfa2cb-b328-4468-a952-03a8b297c22e@oracle.com> (raw)
In-Reply-To: <20240409230806.1545822-1-daniel.sneddon@linux.intel.com>
On 4/10/24 01:08, Daniel Sneddon wrote:
> The definition of spectre_bhi_state() incorrectly returns a const char
> * const. This causes the a compiler warning when building with W=1.
>
> warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
> 2812 | static const char * const spectre_bhi_state(void)
>
> Remove the const qualifier from the pointer.
>
> Fixes: ec9404e40e8f ("x86/bhi: Add BHI mitigation knob")
> Reported-by: Sean Christopherson <seanjc@google.com>
> Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com>
> ---
> arch/x86/kernel/cpu/bugs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
> index e1775debeafe..7e4a706cad80 100644
> --- a/arch/x86/kernel/cpu/bugs.c
> +++ b/arch/x86/kernel/cpu/bugs.c
> @@ -2809,7 +2809,7 @@ static char *pbrsb_eibrs_state(void)
> }
> }
>
> -static const char * const spectre_bhi_state(void)
> +static const char *spectre_bhi_state(void)
> {
> if (!boot_cpu_has_bug(X86_BUG_BHI))
> return "; BHI: Not affected";
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
alex.
prev parent reply other threads:[~2024-04-10 8:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 23:08 Daniel Sneddon
2024-04-10 5:23 ` [tip: x86/urgent] " tip-bot2 for Daniel Sneddon
2024-04-10 8:45 ` Alexandre Chartre [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=c0bfa2cb-b328-4468-a952-03a8b297c22e@oracle.com \
--to=alexandre.chartre@oracle.com \
--cc=bp@alien8.de \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=peterz@infradead.org \
--cc=seanjc@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®