Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 758f588d authored by Borislav Petkov's avatar Borislav Petkov Committed by Radim Krčmář
Browse files

kvm/x86: Fix unused variable warning in kvm_timer_init()



When CONFIG_CPU_FREQ is not set, int cpu is unused and gcc rightfully
warns about it:

  arch/x86/kvm/x86.c: In function ‘kvm_timer_init’:
  arch/x86/kvm/x86.c:5697:6: warning: unused variable ‘cpu’ [-Wunused-variable]
    int cpu;
        ^~~

But since it is used only in the CONFIG_CPU_FREQ block, simply move it
there, thus squashing the warning too.

Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
parent 1001354c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment