[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 4/5] spapr_pci: use the common _FDT() helper
From: |
Greg Kurz |
Subject: |
[Qemu-ppc] [PATCH 4/5] spapr_pci: use the common _FDT() helper |
Date: |
Sat, 09 Sep 2017 17:06:25 +0200 |
User-agent: |
StGit/0.17.1-46-g6855-dirty |
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 <address@hidden>
---
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
-#define _FDT(exp) \
- do { \
- int ret = (exp); \
- if (ret < 0) { \
- return ret; \
- } \
- } while (0)
-
sPAPRPHBState *spapr_pci_find_phb(sPAPRMachineState *spapr, uint64_t buid)
{
sPAPRPHBState *sphb;
- [Qemu-ppc] [PATCH 0/5] spapr_pci: various cleanups and improvements, Greg Kurz, 2017/09/09
- [Qemu-ppc] [PATCH 1/5] spapr_pci: drop useless check in spapr_phb_vfio_get_loc_code(), Greg Kurz, 2017/09/09
- [Qemu-ppc] [PATCH 2/5] spapr_pci: drop useless check in spapr_populate_pci_child_dt(), Greg Kurz, 2017/09/09
- [Qemu-ppc] [PATCH 3/5] spapr_pci: use g_strdup_printf(), Greg Kurz, 2017/09/09
- [Qemu-ppc] [PATCH 4/5] spapr_pci: use the common _FDT() helper,
Greg Kurz <=
- [Qemu-ppc] [PATCH 5/5] spapr_pci: handle FDT creation errors with _FDT(), Greg Kurz, 2017/09/09
- Re: [Qemu-ppc] [PATCH 0/5] spapr_pci: various cleanups and improvements, David Gibson, 2017/09/09
- Re: [Qemu-ppc] [PATCH 0/5] spapr_pci: various cleanups and improvements, David Gibson, 2017/09/10