]> git.proxmox.com Git - mirror_qemu.git/commit - hw/ppc/spapr_pci.c
spapr: Clean up device node name generation for PCI devices
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 22 Mar 2019 05:13:09 +0000 (16:13 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 12 Jun 2019 00:41:49 +0000 (10:41 +1000)
commit4782a8bb81f6d3ac815fb0f603daae4e6030dfa1
tree1721788080a7cee0231b97a9b3b941a9e1aab768
parent2a1224359008e23b051b7b45be4789afa0269f8c
spapr: Clean up device node name generation for PCI devices

spapr_populate_pci_child_dt() adds a 'name' property to the device tree
node for PCI devices.  This is never necessary for a flattened device tree,
it is implicit in the name added when the node is constructed.  In fact
anything we do add to a 'name' property will be overwritten with something
derived from the structural name in the guest firmware (but in fact it is
exactly the same bytes).

So, remove that.  In addition, pci_get_node_name() is very simple, so fold
it into its (also simple) sole caller spapr_create_pci_child_dt().

While we're there rename pci_find_device_name() to the shorter and more
accurate dt_name_from_class().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
hw/ppc/spapr_pci.c