From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Borislav Petkov <bp@alien8.de>
Cc: KVM <kvm@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kvm/x86: Fix unused variable warning in kvm_timer_init()
Date: Thu, 29 Sep 2016 20:26:15 +0200 [thread overview]
Message-ID: <20160929182615.GA13257@potion> (raw)
In-Reply-To: <20160904171357.15110-1-bp@alien8.de>
2016-09-04 19:13+0200, Borislav Petkov:
> From: Borislav Petkov <bp@suse.de>
>
> 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@suse.de>
> ---
Applied to kvm/queue, thanks.
prev parent reply other threads:[~2016-09-29 18:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-04 17:13 [PATCH] kvm/x86: Fix unused variable warning in kvm_timer_init() Borislav Petkov
2016-09-29 18:26 ` Radim Krčmář [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160929182615.GA13257@potion \
--to=rkrcmar@redhat.com \
--cc=bp@alien8.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox