lkml.org 
[lkml]   [2024]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/bugs: Fix return type of spectre_bhi_state()
From

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.

\
 
 \ /
  Last update: 2024-05-27 16:32    [W:0.065 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site