From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] kvm/x86: Fix unused variable warning in kvm_timer_init() Date: Thu, 29 Sep 2016 20:26:15 +0200 Message-ID: <20160929182615.GA13257@potion> References: <20160904171357.15110-1-bp@alien8.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: KVM , LKML To: Borislav Petkov Return-path: Content-Disposition: inline In-Reply-To: <20160904171357.15110-1-bp@alien8.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2016-09-04 19:13+0200, Borislav Petkov: > From: Borislav Petkov > > 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 > --- Applied to kvm/queue, thanks.