From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934886AbcI2S0r (ORCPT ); Thu, 29 Sep 2016 14:26:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47180 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934576AbcI2S0j (ORCPT ); Thu, 29 Sep 2016 14:26:39 -0400 Date: Thu, 29 Sep 2016 20:26:15 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Borislav Petkov Cc: KVM , LKML Subject: Re: [PATCH] kvm/x86: Fix unused variable warning in kvm_timer_init() Message-ID: <20160929182615.GA13257@potion> References: <20160904171357.15110-1-bp@alien8.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160904171357.15110-1-bp@alien8.de> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 29 Sep 2016 18:26:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.