[v8,11/21] hw/i386/amd_iommu: rename Error ** parameter to more common errp
diff mbox series

Message ID 20191205174635.18758-12-vsementsov@virtuozzo.com
State New
Headers show
Series
  • error: prepare for auto propagated local_err
Related show

Commit Message

Vladimir Sementsov-Ogievskiy Dec. 5, 2019, 5:46 p.m. UTC
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 hw/i386/amd_iommu.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Philippe Mathieu-Daudé Dec. 6, 2019, 7:36 a.m. UTC | #1
On 12/5/19 6:46 PM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   hw/i386/amd_iommu.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
> index d55dbf07fc..b1175e52c7 100644
> --- a/hw/i386/amd_iommu.c
> +++ b/hw/i386/amd_iommu.c
> @@ -1533,7 +1533,7 @@ static void amdvi_reset(DeviceState *dev)
>       amdvi_init(s);
>   }
>   
> -static void amdvi_realize(DeviceState *dev, Error **err)
> +static void amdvi_realize(DeviceState *dev, Error **errp)
>   {
>       int ret = 0;
>       AMDVIState *s = AMD_IOMMU_DEVICE(dev);
> @@ -1549,21 +1549,21 @@ static void amdvi_realize(DeviceState *dev, Error **err)
>       /* This device should take care of IOMMU PCI properties */
>       x86_iommu->type = TYPE_AMD;
>       qdev_set_parent_bus(DEVICE(&s->pci), &bus->qbus);
> -    object_property_set_bool(OBJECT(&s->pci), true, "realized", err);
> +    object_property_set_bool(OBJECT(&s->pci), true, "realized", errp);
>       ret = pci_add_capability(&s->pci.dev, AMDVI_CAPAB_ID_SEC, 0,
> -                                         AMDVI_CAPAB_SIZE, err);
> +                                         AMDVI_CAPAB_SIZE, errp);
>       if (ret < 0) {
>           return;
>       }
>       s->capab_offset = ret;
>   
>       ret = pci_add_capability(&s->pci.dev, PCI_CAP_ID_MSI, 0,
> -                             AMDVI_CAPAB_REG_SIZE, err);
> +                             AMDVI_CAPAB_REG_SIZE, errp);
>       if (ret < 0) {
>           return;
>       }
>       ret = pci_add_capability(&s->pci.dev, PCI_CAP_ID_HT, 0,
> -                             AMDVI_CAPAB_REG_SIZE, err);
> +                             AMDVI_CAPAB_REG_SIZE, errp);
>       if (ret < 0) {
>           return;
>       }
> @@ -1578,8 +1578,8 @@ static void amdvi_realize(DeviceState *dev, Error **err)
>       sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->mmio);
>       sysbus_mmio_map(SYS_BUS_DEVICE(s), 0, AMDVI_BASE_ADDR);
>       pci_setup_iommu(bus, amdvi_host_dma_iommu, s);
> -    s->devid = object_property_get_int(OBJECT(&s->pci), "addr", err);
> -    msi_init(&s->pci.dev, 0, 1, true, false, err);
> +    s->devid = object_property_get_int(OBJECT(&s->pci), "addr", errp);
> +    msi_init(&s->pci.dev, 0, 1, true, false, errp);
>       amdvi_init(s);
>   }
>   
>

Patch
diff mbox series

diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index d55dbf07fc..b1175e52c7 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1533,7 +1533,7 @@  static void amdvi_reset(DeviceState *dev)
     amdvi_init(s);
 }
 
-static void amdvi_realize(DeviceState *dev, Error **err)
+static void amdvi_realize(DeviceState *dev, Error **errp)
 {
     int ret = 0;
     AMDVIState *s = AMD_IOMMU_DEVICE(dev);
@@ -1549,21 +1549,21 @@  static void amdvi_realize(DeviceState *dev, Error **err)
     /* This device should take care of IOMMU PCI properties */
     x86_iommu->type = TYPE_AMD;
     qdev_set_parent_bus(DEVICE(&s->pci), &bus->qbus);
-    object_property_set_bool(OBJECT(&s->pci), true, "realized", err);
+    object_property_set_bool(OBJECT(&s->pci), true, "realized", errp);
     ret = pci_add_capability(&s->pci.dev, AMDVI_CAPAB_ID_SEC, 0,
-                                         AMDVI_CAPAB_SIZE, err);
+                                         AMDVI_CAPAB_SIZE, errp);
     if (ret < 0) {
         return;
     }
     s->capab_offset = ret;
 
     ret = pci_add_capability(&s->pci.dev, PCI_CAP_ID_MSI, 0,
-                             AMDVI_CAPAB_REG_SIZE, err);
+                             AMDVI_CAPAB_REG_SIZE, errp);
     if (ret < 0) {
         return;
     }
     ret = pci_add_capability(&s->pci.dev, PCI_CAP_ID_HT, 0,
-                             AMDVI_CAPAB_REG_SIZE, err);
+                             AMDVI_CAPAB_REG_SIZE, errp);
     if (ret < 0) {
         return;
     }
@@ -1578,8 +1578,8 @@  static void amdvi_realize(DeviceState *dev, Error **err)
     sysbus_init_mmio(SYS_BUS_DEVICE(s), &s->mmio);
     sysbus_mmio_map(SYS_BUS_DEVICE(s), 0, AMDVI_BASE_ADDR);
     pci_setup_iommu(bus, amdvi_host_dma_iommu, s);
-    s->devid = object_property_get_int(OBJECT(&s->pci), "addr", err);
-    msi_init(&s->pci.dev, 0, 1, true, false, err);
+    s->devid = object_property_get_int(OBJECT(&s->pci), "addr", errp);
+    msi_init(&s->pci.dev, 0, 1, true, false, errp);
     amdvi_init(s);
 }