qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device()


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device()
Date: Sun, 20 Jan 2013 19:16:55 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2

Am 20.01.2013 18:56, schrieb Andreas Färber:
> DeviceState::parent_bus is document as private and should be accessed

"documented" - please fix when applying.

> through qdev_get_parent_bus(). Use a DEVICE() cast instead of accessing
> ISADevice's qdev field directly. Use ISA_BUS() in place of DO_UPCAST().
> 
> Signed-off-by: Andreas Färber <address@hidden>
> Cc: Anthony Liguori <address@hidden>
> ---
>  hw/isa.h |    2 +-
>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)
> 
> diff --git a/hw/isa.h b/hw/isa.h
> index 62e89d3..7a8874a 100644
> --- a/hw/isa.h
> +++ b/hw/isa.h
> @@ -82,7 +82,7 @@ void isa_register_portio_list(ISADevice *dev, uint16_t 
> start,
>  
>  static inline ISABus *isa_bus_from_device(ISADevice *d)
>  {
> -    return DO_UPCAST(ISABus, qbus, d->qdev.parent_bus);
> +    return ISA_BUS(qdev_get_parent_bus(DEVICE(d)));
>  }
>  
>  extern hwaddr isa_mem_base;

-- 
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]