Skip to content

Commit 2b73095

Browse files
committed
x86/microcode/amd: Fix two -Wunused-but-set-variable warnings
The dummy variable is the high part of the microcode revision MSR which is defined as reserved. Mark it unused so that W=1 builds don't trigger the above warning. No functional changes. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20190928162559.26294-1-bp@alien8.de
1 parent 54ecb8f commit 2b73095

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • arch/x86/kernel/cpu/microcode

‎arch/x86/kernel/cpu/microcode/amd.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
567567
void reload_ucode_amd(void)
568568
{
569569
struct microcode_amd *mc;
570-
u32 rev, dummy;
570+
u32 rev, dummy __always_unused;
571571

572572
mc = (struct microcode_amd *)amd_ucode_patch;
573573

@@ -673,7 +673,7 @@ static enum ucode_state apply_microcode_amd(int cpu)
673673
struct ucode_cpu_info *uci;
674674
struct ucode_patch *p;
675675
enum ucode_state ret;
676-
u32 rev, dummy;
676+
u32 rev, dummy __always_unused;
677677

678678
BUG_ON(raw_smp_processor_id() != cpu);
679679

0 commit comments

Comments
 (0)