linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xu Yihang <xuyihang@huawei.com>
To: <kys@microsoft.com>, <haiyangz@microsoft.com>,
	<sthemmin@microsoft.com>, <tglx@linutronix.de>,
	<mingo@redhat.com>, <bp@alien8.de>, <x86@kernel.org>
Cc: <linux-hyperv@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<xuyihang@huawei.com>
Subject: [PATCH -next] x86: Fix unused variable 'msr_val' warning
Date: Thu, 18 Mar 2021 16:03:48 +0800	[thread overview]
Message-ID: <20210318080348.151022-1-xuyihang@huawei.com> (raw)

Fixes the following W=1 kernel build warning(s):
arch/x86/hyperv/hv_spinlock.c:28:16: warning: variable ‘msr_val’ set but not used [-Wunused-but-set-variable]
  unsigned long msr_val;

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xu Yihang <xuyihang@huawei.com>
---
 arch/x86/hyperv/hv_spinlock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/hyperv/hv_spinlock.c b/arch/x86/hyperv/hv_spinlock.c
index f3270c1fc48c..67bc15c7752a 100644
--- a/arch/x86/hyperv/hv_spinlock.c
+++ b/arch/x86/hyperv/hv_spinlock.c
@@ -25,7 +25,7 @@ static void hv_qlock_kick(int cpu)
 
 static void hv_qlock_wait(u8 *byte, u8 val)
 {
-	unsigned long msr_val;
+	unsigned long msr_val __maybe_unused;
 	unsigned long flags;
 
 	if (in_nmi())
-- 
2.17.1


             reply	other threads:[~2021-03-18  8:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18  8:03 Xu Yihang [this message]
2021-03-19 18:48 ` [PATCH -next] x86: Fix unused variable 'msr_val' warning Michael Kelley
2021-03-22  3:17 Xu Yihang
2021-03-22 11:04 ` Wei Liu
2021-03-22 21:08 ` Ingo Molnar
2021-03-22 23:32   ` Michael Kelley
2021-03-23  0:13     ` Ingo Molnar
2021-03-23 11:34       ` Wei Liu
2021-03-23  2:43 ` Xu Yihang
2021-03-24 11:28   ` Wei Liu

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=20210318080348.151022-1-xuyihang@huawei.com \
    --to=xuyihang@huawei.com \
    --cc=bp@alien8.de \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sthemmin@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).