On 21.10.21 12:42, Peter Xu wrote: > There're three places that can be rewritten with the pci_for_each_root_bus() > helper that we just introduced. De-dup the code. > > Signed-off-by: Peter Xu <pet...@redhat.com> > --- > hw/arm/virt-acpi-build.c | 31 +++++++++++-------------------- > hw/i386/acpi-build.c | 38 ++++++++++---------------------------- > 2 files changed, 21 insertions(+), 48 deletions(-) > > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c > index 6cec97352b..54b82aa863 100644 > --- a/hw/arm/virt-acpi-build.c > +++ b/hw/arm/virt-acpi-build.c > @@ -263,28 +263,20 @@ struct AcpiIortIdMapping { > typedef struct AcpiIortIdMapping AcpiIortIdMapping; > > /* Build the iort ID mapping to SMMUv3 for a given PCI host bridge */ > -static int > -iort_host_bridges(Object *obj, void *opaque) > +static void > +iort_host_bridges(PCIBus *bus, void *opaque)
^ I never understood the use of the line break within a function declaration+definition, especially if everything just fits into a single line. If it's already there, it's most probably in-line with the QEMU coding style. LGTM Reviewed-by: David Hildenbrand <da...@redhat.com> -- Thanks, David / dhildenb