From: Sebastian Andrzej Siewior Date: Fri, 15 Mar 2019 17:58:15 +0000 (+0100) Subject: kvm: don't redefine flags as something else X-Git-Tag: v5.4-rc1~1293^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca0488aadd014809862428cde896a6a6e8f13e42;p=platform%2Fkernel%2Flinux-rpi.git kvm: don't redefine flags as something else 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 Cc: "Radim Krčmář" Cc: kvm@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paolo Bonzini --- diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 4325250..001aeda 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;