[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/40] spapr/xive: Simplify kvmppc_xive_disconnect()
From: |
David Gibson |
Subject: |
[PULL 20/40] spapr/xive: Simplify kvmppc_xive_disconnect() |
Date: |
Tue, 18 Aug 2020 14:19:02 +1000 |
From: Greg Kurz <groug@kaod.org>
Since this function begins with:
/* The KVM XIVE device is not in use */
if (!xive || xive->fd == -1) {
return;
}
we obviously don't need to check xive->fd again.
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159673297296.766512.14780055521619233656.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/intc/spapr_xive_kvm.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/intc/spapr_xive_kvm.c b/hw/intc/spapr_xive_kvm.c
index d55ea4670e..893a1ee77e 100644
--- a/hw/intc/spapr_xive_kvm.c
+++ b/hw/intc/spapr_xive_kvm.c
@@ -873,10 +873,8 @@ void kvmppc_xive_disconnect(SpaprInterruptController *intc)
* and removed from the list of devices of the VM. The VCPU
* presenters are also detached from the device.
*/
- if (xive->fd != -1) {
- close(xive->fd);
- xive->fd = -1;
- }
+ close(xive->fd);
+ xive->fd = -1;
kvm_kernel_irqchip = false;
kvm_msi_via_irqfd_allowed = false;
--
2.26.2
- [PULL 14/40] target/ppc: add vmulh{su}d instructions, (continued)
- [PULL 14/40] target/ppc: add vmulh{su}d instructions, David Gibson, 2020/08/18
- [PULL 16/40] docs: adding NUMA documentation for pseries, David Gibson, 2020/08/18
- [PULL 10/40] ppc/xive: Fix some typos in comments, David Gibson, 2020/08/18
- [PULL 13/40] target/ppc: add vmulh{su}w instructions, David Gibson, 2020/08/18
- [PULL 18/40] spapr: Clarify error and documentation for broken KVM XICS, David Gibson, 2020/08/18
- [PULL 15/40] target/ppc: Fix SPE unavailable exception triggering, David Gibson, 2020/08/18
- [PULL 17/40] docs: Update POWER9 XIVE support for nested guests, David Gibson, 2020/08/18
- [PULL 19/40] spapr/xive: Fix xive->fd if kvm_create_device() fails, David Gibson, 2020/08/18
- [PULL 22/40] ppc/xive: Rework setup of XiveSource::esb_mmio, David Gibson, 2020/08/18
- [PULL 23/40] ppc/xive: Introduce dedicated kvm_irqchip_in_kernel() wrappers, David Gibson, 2020/08/18
- [PULL 20/40] spapr/xive: Simplify kvmppc_xive_disconnect(),
David Gibson <=
- [PULL 21/40] target/ppc: Integrate icount to purr, vtb, and tbu40, David Gibson, 2020/08/18
- [PULL 24/40] spapr/xive: Convert KVM device fd checks to assert(), David Gibson, 2020/08/18
- [PULL 27/40] spapr/xive: Rework error handling of kvmppc_xive_source_reset(), David Gibson, 2020/08/18
- [PULL 26/40] spapr/xive: Rework error handling of kvmppc_xive_cpu_connect(), David Gibson, 2020/08/18
- [PULL 25/40] spapr: Simplify error handling in spapr_phb_realize(), David Gibson, 2020/08/18
- [PULL 29/40] spapr/xive: Rework error handling of kvmppc_xive_cpu_[gs]et_state(), David Gibson, 2020/08/18
- [PULL 28/40] spapr/xive: Rework error handling of kvmppc_xive_mmap(), David Gibson, 2020/08/18
- [PULL 37/40] ppc/xive: Simplify error handling in xive_tctx_realize(), David Gibson, 2020/08/18
- [PULL 30/40] spapr/xive: Rework error handling of kvmppc_xive_[gs]et_queue_config(), David Gibson, 2020/08/18
- [PULL 31/40] spapr/xive: Rework error handling in kvmppc_xive_get_queues(), David Gibson, 2020/08/18