From nobody Tue Nov 4 07:12:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1504969701199298.98070756808045; Sat, 9 Sep 2017 08:08:21 -0700 (PDT) Received: from localhost ([::1]:49882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqhMq-0000Yu-F2 for importer@patchew.org; Sat, 09 Sep 2017 11:08:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqhL8-0007v5-LK for qemu-devel@nongnu.org; Sat, 09 Sep 2017 11:06:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqhL4-0006Hd-5u for qemu-devel@nongnu.org; Sat, 09 Sep 2017 11:06:34 -0400 Received: from 10.mo177.mail-out.ovh.net ([46.105.73.133]:41248) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqhL3-0006FX-VJ for qemu-devel@nongnu.org; Sat, 09 Sep 2017 11:06:30 -0400 Received: from player714.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo177.mail-out.ovh.net (Postfix) with ESMTP id 8F0BC751FF for ; Sat, 9 Sep 2017 17:06:28 +0200 (CEST) Received: from [192.168.0.243] (gar31-1-82-66-74-139.fbx.proxad.net [82.66.74.139]) (Authenticated sender: groug@kaod.org) by player714.ha.ovh.net (Postfix) with ESMTPA id 5CCB33C0073; Sat, 9 Sep 2017 17:06:26 +0200 (CEST) From: Greg Kurz To: qemu-devel@nongnu.org Date: Sat, 09 Sep 2017 17:06:25 +0200 Message-ID: <150496958584.9654.9736122740323515191.stgit@bahia> In-Reply-To: <150496954641.9654.1998704077006846521.stgit@bahia> References: <150496954641.9654.1998704077006846521.stgit@bahia> User-Agent: StGit/0.17.1-46-g6855-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 248823881333578067 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeelledrfeeigdekjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 46.105.73.133 Subject: [Qemu-devel] [PATCH 4/5] spapr_pci: use the common _FDT() helper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 All other users in hw/ppc already consider an error when building the FDT to be fatal, even on hotplug paths. There's no valid reason for spapr_pci to behave differently. So let's used the common _FDT() helper which terminates QEMU when libfdt fails. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 6da73fe6bc29..abb9f05e7b75 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -40,7 +40,7 @@ #include "trace.h" #include "qemu/error-report.h" #include "qapi/qmp/qerror.h" - +#include "hw/ppc/fdt.h" #include "hw/pci/pci_bridge.h" #include "hw/pci/pci_bus.h" #include "hw/pci/pci_ids.h" @@ -61,14 +61,6 @@ #define RTAS_TYPE_MSI 1 #define RTAS_TYPE_MSIX 2 =20 -#define _FDT(exp) \ - do { \ - int ret =3D (exp); \ - if (ret < 0) { \ - return ret; \ - } \ - } while (0) - sPAPRPHBState *spapr_pci_find_phb(sPAPRMachineState *spapr, uint64_t buid) { sPAPRPHBState *sphb;