]> git.itanic.dy.fi Git - linux-stable/commit
x86/bugs: Fix return type of spectre_bhi_state()
authorDaniel Sneddon <daniel.sneddon@linux.intel.com>
Tue, 9 Apr 2024 23:08:05 +0000 (16:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Apr 2024 09:23:40 +0000 (11:23 +0200)
commit183d8beabff578b0ee764e2332c25c36fe836f08
tree0837e45c17b9db6cc8eef836af0a5b44d540cc4e
parentbb43c568f74f843b3e8547d125d82a6ec6a1a61e
x86/bugs: Fix return type of spectre_bhi_state()

commit 04f4230e2f86a4e961ea5466eda3db8c1762004d upstream.

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>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240409230806.1545822-1-daniel.sneddon@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/bugs.c