[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 28/36] spapr_pci: Get rid of duplicate code for node
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 28/36] spapr_pci: Get rid of duplicate code for node name creation |
Date: |
Fri, 26 Apr 2019 16:06:19 +1000 |
From: Greg Kurz <address@hidden>
According to the changelog of 298a971024534, SpaprPhbState::dtbusname was
introduced to "make it easier to relate the guest and qemu views of memory
to each other", hence its name.
Use it when creating the PHB node to avoid code duplication.
Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_pci.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index d6d0a7115c..f005854dec 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -2176,7 +2176,6 @@ int spapr_populate_pci_dt(SpaprPhbState *phb, uint32_t
intc_phandle, void *fdt,
uint32_t nr_msis, int *node_offset)
{
int bus_off, i, j, ret;
- gchar *nodename;
uint32_t bus_range[] = { cpu_to_be32(0), cpu_to_be32(0xff) };
struct {
uint32_t hi;
@@ -2227,9 +2226,7 @@ int spapr_populate_pci_dt(SpaprPhbState *phb, uint32_t
intc_phandle, void *fdt,
Error *errp = NULL;
/* Start populating the FDT */
- nodename = g_strdup_printf("address@hidden" PRIx64, phb->buid);
- _FDT(bus_off = fdt_add_subnode(fdt, 0, nodename));
- g_free(nodename);
+ _FDT(bus_off = fdt_add_subnode(fdt, 0, phb->dtbusname));
if (node_offset) {
*node_offset = bus_off;
}
--
2.20.1
- [Qemu-devel] [PULL 14/36] target/ppc: Style fixes for machine.c, (continued)
- [Qemu-devel] [PULL 14/36] target/ppc: Style fixes for machine.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 21/36] target/ppc: Style fixes for monitor.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 26/36] target/ppc: Style fixes for translate/vmx-impl.inc.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 23/36] target/ppc: Style fixes for translate.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 15/36] target/ppc: Style fixes for mem_helper.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 19/36] target/ppc: Style fixes for mmu-hash64.[ch], David Gibson, 2019/04/26
- [Qemu-devel] [PULL 24/36] target/ppc: Style fixes for translate/fp-impl.inc.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 29/36] spapr: Drop duplicate PCI swizzle code, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 20/36] target/ppc: Style fixes for mmu_helper.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 27/36] target/ppc: Style fixes for translate/spe-impl.inc.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 28/36] spapr_pci: Get rid of duplicate code for node name creation,
David Gibson <=
- [Qemu-devel] [PULL 22/36] target/ppc: Style fixes for translate_init.inc.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 34/36] ppc/hash64: Rework R and C bit updates, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 32/36] target/ppc: Don't check UPRT in radix mode when in HV real mode, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 25/36] target/ppc: Style fixes for translate/vsx-impl.inc.c, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 36/36] target/ppc: improve performance of large BAT invalidations, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 30/36] target/ppc/trace-events: Fix trivial typo, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 35/36] ppc/hash32: Rework R and C bit updates, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 33/36] ppc/spapr: Use proper HPTE accessors for H_READ, David Gibson, 2019/04/26
- [Qemu-devel] [PULL 31/36] target/ppc/kvm: Convert DPRINTF to traces, David Gibson, 2019/04/26
- Re: [Qemu-devel] [PULL 00/36] ppc-for-4.1 queue 20190426, Peter Maydell, 2019/04/28