Skip to content

Commit 04f4230

Browse files
Daniel SneddonIngo Molnar
authored andcommitted
x86/bugs: Fix return type of spectre_bhi_state()
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: ec9404e ("x86/bhi: Add BHI mitigation knob") Reported-by: Sean Christopherson <[email protected]> Signed-off-by: Daniel Sneddon <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a40d252 commit 04f4230

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2809,7 +2809,7 @@ static char *pbrsb_eibrs_state(void)
28092809
}
28102810
}
28112811

2812-
static const char * const spectre_bhi_state(void)
2812+
static const char *spectre_bhi_state(void)
28132813
{
28142814
if (!boot_cpu_has_bug(X86_BUG_BHI))
28152815
return "; BHI: Not affected";

0 commit comments

Comments
 (0)