linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, linux-kbuild@vger.kernel.org,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Radim Krčmář" <rkrcmar@redhat.com>,
	kvm@vger.kernel.org
Subject: [PATCH 3/3] kvm: don't redefine flags as something else
Date: Wed, 17 Oct 2018 19:05:54 +0200	[thread overview]
Message-ID: <20181017170554.18841-4-bigeasy@linutronix.de> (raw)
In-Reply-To: <20181017170554.18841-1-bigeasy@linutronix.de>

The function irqfd_wakeup() has flags defined as __poll_t and then it
has additional flags which is used for irqflags.

Redefine the inner flags variable as iflags so it does not shadow the
outer flags.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 virt/kvm/eventfd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index b20b751286fc6..d15a51622d53e 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -214,9 +214,9 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 
 	if (flags & EPOLLHUP) {
 		/* The eventfd is closing, detach from KVM */
-		unsigned long flags;
+		unsigned long iflags;
 
-		spin_lock_irqsave(&kvm->irqfds.lock, flags);
+		spin_lock_irqsave(&kvm->irqfds.lock, iflags);
 
 		/*
 		 * We must check if someone deactivated the irqfd before
@@ -230,7 +230,7 @@ irqfd_wakeup(wait_queue_entry_t *wait, unsigned mode, int sync, void *key)
 		if (irqfd_is_active(irqfd))
 			irqfd_deactivate(irqfd);
 
-		spin_unlock_irqrestore(&kvm->irqfds.lock, flags);
+		spin_unlock_irqrestore(&kvm->irqfds.lock, iflags);
 	}
 
 	return 0;
-- 
2.19.1


  parent reply	other threads:[~2018-10-17 17:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 17:05 [PATCH 0/3] Let sparse check for shadowed variables Sebastian Andrzej Siewior
2018-10-17 17:05 ` [PATCH 1/3] kbuild: Add -Wshadow to sparse Sebastian Andrzej Siewior
2018-10-17 19:25   ` Luc Van Oostenryck
2018-10-17 20:13     ` Sebastian Andrzej Siewior
2018-10-17 17:05 ` [PATCH 2/3] x86/mcelog: Remove one mce_helper definition Sebastian Andrzej Siewior
2018-10-17 17:10   ` Borislav Petkov
2018-10-17 18:22     ` Thomas Gleixner
2018-10-17 22:12   ` [tip:ras/core] " tip-bot for Sebastian Andrzej Siewior
2018-10-17 17:05 ` Sebastian Andrzej Siewior [this message]
2018-10-17 17:06   ` [PATCH 3/3] kvm: don't redefine flags as something else Paolo Bonzini
2019-03-13  8:58     ` Sebastian Andrzej Siewior
2019-03-13 11:06       ` Paolo Bonzini

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=20181017170554.18841-4-bigeasy@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).