* [PATCH] x86/bugs: Fix return type of spectre_bhi_state()
@ 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 ` [PATCH] " Alexandre Chartre
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Sneddon @ 2024-04-09 23:08 UTC (permalink / raw)
To: Thomas Gleixner, Borislav Petkov, Peter Zijlstra, Josh Poimboeuf,
Ingo Molnar, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
Pawan Gupta, Daniel Sneddon, Alexandre Chartre
Cc: Sean Christopherson, H. Peter Anvin,
open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)
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";
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip: x86/urgent] x86/bugs: Fix return type of spectre_bhi_state()
2024-04-09 23:08 [PATCH] x86/bugs: Fix return type of spectre_bhi_state() Daniel Sneddon
@ 2024-04-10 5:23 ` tip-bot2 for Daniel Sneddon
2024-04-10 8:45 ` [PATCH] " Alexandre Chartre
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Daniel Sneddon @ 2024-04-10 5:23 UTC (permalink / raw)
To: linux-tip-commits
Cc: Sean Christopherson, Daniel Sneddon, Ingo Molnar, Linus Torvalds,
x86, linux-kernel
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 04f4230e2f86a4e961ea5466eda3db8c1762004d
Gitweb: https://git.kernel.org/tip/04f4230e2f86a4e961ea5466eda3db8c1762004d
Author: Daniel Sneddon <daniel.sneddon@linux.intel.com>
AuthorDate: Tue, 09 Apr 2024 16:08:05 -07:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 10 Apr 2024 07:05:04 +02:00
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: 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
---
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 2954637..27f5004 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";
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] x86/bugs: Fix return type of spectre_bhi_state()
2024-04-09 23:08 [PATCH] x86/bugs: Fix return type of spectre_bhi_state() Daniel Sneddon
2024-04-10 5:23 ` [tip: x86/urgent] " tip-bot2 for Daniel Sneddon
@ 2024-04-10 8:45 ` Alexandre Chartre
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Chartre @ 2024-04-10 8:45 UTC (permalink / raw)
To: Daniel Sneddon, Thomas Gleixner, Borislav Petkov, Peter Zijlstra,
Josh Poimboeuf, Ingo Molnar, Dave Hansen,
maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),
Pawan Gupta
Cc: Sean Christopherson, H. Peter Anvin,
open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-10 8:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-09 23:08 [PATCH] x86/bugs: Fix return type of spectre_bhi_state() Daniel Sneddon
2024-04-10 5:23 ` [tip: x86/urgent] " tip-bot2 for Daniel Sneddon
2024-04-10 8:45 ` [PATCH] " Alexandre Chartre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome