From nobody Tue Feb 10 05:41:20 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1597725244; cv=none; d=zohomail.com; s=zohoarc; b=Uoh4bXkJiPpnFKHraocamhBuvlDEpILEYV+B0cB3To729PcKPaML/qt5krfSQc/fWnPAZ+wifvmTFACnGnBkKdnCtzDTFAvyTVAgztBNBrt6QJePAH5MPSOaNtW+bZFIYJFsP8JPudG2pOvgPDFXdmn5JfffTfa11lUaLxqKaEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597725244; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0iMVqK7I91sirUdAs8LGUmpeVuykAaNsh5dFvvvoKl8=; b=Y4JohxcocKw3WT3QU4oi8WarR2G3KWD12pXyIqPSoyaVP8+wA+5Es0I5YbO0X7bmokGSPEC8TZ6t7PbY1q1BCn0H8pjO4g8iZEWPXbPLSDAGKZFTRGM8urS/ocWBLUBJ77QsrKk1mzDzuZJ5mABN0C+B0qt1qeRTmAImmQVh68Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597725244806565.5197184510882; Mon, 17 Aug 2020 21:34:04 -0700 (PDT) Received: from localhost ([::1]:56196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7tJz-0006wl-Gg for importer@patchew.org; Tue, 18 Aug 2020 00:34:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7t6Y-0008Q5-4X; Tue, 18 Aug 2020 00:20:10 -0400 Received: from ozlabs.org ([203.11.71.1]:39803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7t6W-0006NF-AO; Tue, 18 Aug 2020 00:20:09 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4BVyNc659Wz9sVZ; Tue, 18 Aug 2020 14:19:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1597724368; bh=br1dq6DE2bypNpRudqQL9GprFBfraC/xQtt+MK7jboA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CUNbAnyU2AQz7T2r5szy9Du4Z4iPBFGt7nvElZBNmWA0hKPUnmqC627vtv0gO8Ngc uC/4dqkYwp9n3DXr753rRdpoQO0LtBdtw/RVdL+uxh778eWUafroVkUfFz2I4NQ59/ bYXEboJIGPaNk/7jYr2mElpZVn/uZ/bD+kvqgRTM= From: David Gibson To: peter.maydell@linaro.org, groug@kaod.org Subject: [PULL 20/40] spapr/xive: Simplify kvmppc_xive_disconnect() Date: Tue, 18 Aug 2020 14:19:02 +1000 Message-Id: <20200818041922.251708-21-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200818041922.251708-1-david@gibson.dropbear.id.au> References: <20200818041922.251708-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=203.11.71.1; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/18 00:19:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -9 X-Spam_score: -1.0 X-Spam_bar: - X-Spam_report: (-1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Greg Kurz Since this function begins with: /* The KVM XIVE device is not in use */ if (!xive || xive->fd =3D=3D -1) { return; } we obviously don't need to check xive->fd again. Signed-off-by: Greg Kurz Message-Id: <159673297296.766512.14780055521619233656.stgit@bahia.lan> Signed-off-by: David Gibson --- 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 !=3D -1) { - close(xive->fd); - xive->fd =3D -1; - } + close(xive->fd); + xive->fd =3D -1; =20 kvm_kernel_irqchip =3D false; kvm_msi_via_irqfd_allowed =3D false; --=20 2.26.2