Re: [PATCH] kvm/x86: Fix unused variable warning in kvm_timer_init()

From: Radim KrÄmÃÅ
Date: Thu Sep 29 2016 - 14:26:49 EST


2016-09-04 19:13+0200, Borislav Petkov:
> From: Borislav Petkov <bp@xxxxxxx>
>
> 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: Borislav Petkov <bp@xxxxxxx>
> ---

Applied to kvm/queue, thanks.