qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFT PATCH v1 16/30] isa/*: QOM casting sweep


From: Andreas Färber
Subject: Re: [Qemu-devel] [RFT PATCH v1 16/30] isa/*: QOM casting sweep
Date: Tue, 11 Jun 2013 11:58:21 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

Am 11.06.2013 08:52, schrieb address@hidden:
> From: Peter Crosthwaite <address@hidden>
> 
> Use standard QOM cast macros. Remove usage of DO_UPCAST and
> direct -> style upcasting.
> 
> Signed-off-by: Peter Crosthwaite <address@hidden>
> ---
> 
>  hw/isa/i82378.c   |  8 ++++----
>  hw/isa/lpc_ich9.c |  6 +++---
>  hw/isa/piix4.c    |  4 ++--
>  hw/isa/vt82c686.c | 14 +++++++-------
>  4 files changed, 16 insertions(+), 16 deletions(-)
[...]
> diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
> index d750413..1eb05b2 100644
> --- a/hw/isa/piix4.c
> +++ b/hw/isa/piix4.c
[...]
> @@ -98,7 +98,7 @@ int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)
>      PCIDevice *d;
>  
>      d = pci_create_simple_multifunction(bus, devfn, true, "PIIX4");
> -    *isa_bus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, 
> "isa.0"));
> +    *isa_bus = DO_UPCAST(ISABus, qbus, qdev_get_child_bus(DEVICE(d), 
> "isa.0"));

Conflict, my ISABus patch does ISA_BUS() in addition:
http://patchwork.ozlabs.org/patch/249705/

>      return d->devfn;
>  }
>  
> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
> index 5261927..8ec0d84 100644
> --- a/hw/isa/vt82c686.c
> +++ b/hw/isa/vt82c686.c
[...]
> @@ -450,7 +450,7 @@ ISABus *vt82c686b_init(PCIBus *bus, int devfn)
>  
>      d = pci_create_simple_multifunction(bus, devfn, true, "VT82C686B");
>  
> -    return DO_UPCAST(ISABus, qbus, qdev_get_child_bus(&d->qdev, "isa.0"));
> +    return DO_UPCAST(ISABus, qbus, qdev_get_child_bus(DEVICE(d), "isa.0"));

Ditto.

>  }
>  
>  static void via_class_init(ObjectClass *klass, void *data)

Otherwise looks fine.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]