[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw: Use TYPE_PCI_BUS definition where appropriate
From: |
Eric Auger |
Subject: |
Re: [PATCH] hw: Use TYPE_PCI_BUS definition where appropriate |
Date: |
Thu, 19 Jan 2023 09:04:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 |
Hi Philippe,
On 1/17/23 20:30, Philippe Mathieu-Daudé wrote:
> Use the proper QOM type definition instead of magic string.
> This also helps during eventual refactor while using git-grep.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Thanks
Eric
> ---
> hw/arm/smmu-common.c | 3 ++-
> hw/virtio/virtio-iommu.c | 3 ++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
> index 54186f31cb..733c964778 100644
> --- a/hw/arm/smmu-common.c
> +++ b/hw/arm/smmu-common.c
> @@ -535,7 +535,8 @@ static void smmu_base_reset_hold(Object *obj)
>
> static Property smmu_dev_properties[] = {
> DEFINE_PROP_UINT8("bus_num", SMMUState, bus_num, 0),
> - DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus, "PCI", PCIBus *),
> + DEFINE_PROP_LINK("primary-bus", SMMUState, primary_bus,
> + TYPE_PCI_BUS, PCIBus *),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
> index 23c470977e..1cd258135d 100644
> --- a/hw/virtio/virtio-iommu.c
> +++ b/hw/virtio/virtio-iommu.c
> @@ -1366,7 +1366,8 @@ static const VMStateDescription vmstate_virtio_iommu = {
> };
>
> static Property virtio_iommu_properties[] = {
> - DEFINE_PROP_LINK("primary-bus", VirtIOIOMMU, primary_bus, "PCI", PCIBus
> *),
> + DEFINE_PROP_LINK("primary-bus", VirtIOIOMMU, primary_bus,
> + TYPE_PCI_BUS, PCIBus *),
> DEFINE_PROP_BOOL("boot-bypass", VirtIOIOMMU, boot_bypass, true),
> DEFINE_PROP_END_OF_LIST(),
> };