Re: [PATCH] x86/mce: Fix build warning after MSR-interface switch

Ingo Molnar <[email protected]> Fri, 17 Jul 2026 11:28:29 +0200
Newsgroups org.kernel.vger.linux-edac,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
* Juergen Gross <[email protected]> wrote:

> The recent switch to 64-bit MSR interfaces introduced a build warning.
> 
> Fix it.
> 
> Fixes: cff219368bd0 ("x86/mce: Stop using 32-bit MSR interfaces")
> Reported-by: kernel test robot <[email protected]>
> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Juergen Gross <[email protected]>
> ---
> Said patch is in tip only right now, so this patch could either be added
> on top or be folded into the original patch.
> ---
>  arch/x86/kernel/cpu/mce/p5.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/mce/p5.c b/arch/x86/kernel/cpu/mce/p5.c
> index eb99f384d747..3c2b6cc918b1 100644
> --- a/arch/x86/kernel/cpu/mce/p5.c
> +++ b/arch/x86/kernel/cpu/mce/p5.c
> @@ -44,7 +44,7 @@ noinstr void pentium_machine_check(struct pt_regs *regs)
>  /* Set up machine check reporting for processors with Intel style MCE: */
>  void intel_p5_mcheck_init(struct cpuinfo_x86 *c)
>  {
> -	u64 q;
> +	u64 __maybe_unused q;

Could we just fix the API to always assign 'q', instead of this
ugly & vague annotation?

Thanks,

	Ingo