mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot for H. Peter Anvin" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	kys@microsoft.com, tglx@linutronix.de, hpa@linux.intel.com
Subject: [tip:x86/hyperv] x86, hyperv: Move a variable to avoid an unused variable warning
Date: Wed, 6 Nov 2013 10:06:33 -0800	[thread overview]
Message-ID: <tip-4c08edd305019061bf1ac95ce089497bdbb8b8ac@git.kernel.org> (raw)
In-Reply-To: <1381444224-3303-1-git-send-email-kys@microsoft.com>

Commit-ID:  4c08edd305019061bf1ac95ce089497bdbb8b8ac
Gitweb:     http://git.kernel.org/tip/4c08edd305019061bf1ac95ce089497bdbb8b8ac
Author:     H. Peter Anvin <hpa@zytor.com>
AuthorDate: Wed, 6 Nov 2013 10:00:05 -0800
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Wed, 6 Nov 2013 10:02:05 -0800

x86, hyperv: Move a variable to avoid an unused variable warning

The variable hv_lapic_frequency causes an unused variable warning if
CONFIG_X86_LOCAL_APIC is disabled.  Since the variable is only used
inside a small if statement, move the declaration of that variable
into the if statement itself.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Link: http://lkml.kernel.org/r/1381444224-3303-1-git-send-email-kys@microsoft.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/kernel/cpu/mshyperv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 9f6e9f8..9f7ca26 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -70,8 +70,6 @@ static struct clocksource hyperv_cs = {
 
 static void __init ms_hyperv_init_platform(void)
 {
-	u64	hv_lapic_frequency;
-
 	/*
 	 * Extract the features and hints
 	 */
@@ -86,6 +84,8 @@ static void __init ms_hyperv_init_platform(void)
 		/*
 		 * Get the APIC frequency.
 		 */
+		u64	hv_lapic_frequency;
+
 		rdmsrl(HV_X64_MSR_APIC_FREQUENCY, hv_lapic_frequency);
 		hv_lapic_frequency = div_u64(hv_lapic_frequency, HZ);
 		lapic_timer_frequency = hv_lapic_frequency;

      parent reply	other threads:[~2013-11-06 18:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-10 22:30 [PATCH 1/1] X86: hypev: Correctly guard the local APIC calibration code K. Y. Srinivasan
2013-10-10 22:24 ` [tip:x86/hyperv] x86, hyperv: " tip-bot for K. Y. Srinivasan
2013-11-06 18:06 ` tip-bot for H. Peter Anvin [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=tip-4c08edd305019061bf1ac95ce089497bdbb8b8ac@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome