qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device()
@ 2013-01-20 17:56 Andreas Färber
  2013-01-20 18:16 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2013-01-20 17:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: Andreas Färber, Anthony Liguori

DeviceState::parent_bus is document as private and should be accessed
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 <afaerber@suse.de>
Cc: Anthony Liguori <anthony@codemonkey.ws>
---
 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;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device()
  2013-01-20 17:56 [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device() Andreas Färber
@ 2013-01-20 18:16 ` Andreas Färber
  2013-02-01  9:06   ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2013-01-20 18:16 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

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 <afaerber@suse.de>
> Cc: Anthony Liguori <anthony@codemonkey.ws>
> ---
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device()
  2013-01-20 18:16 ` Andreas Färber
@ 2013-02-01  9:06   ` Andreas Färber
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Färber @ 2013-02-01  9:06 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Am 20.01.2013 19:16, schrieb Andreas Färber:
> 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 <afaerber@suse.de>
>> Cc: Anthony Liguori <anthony@codemonkey.ws>
>> ---
>>  hw/isa.h |    2 +-
>>  1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-)

Ping? Not 1.4 material or an oversight? Should I resend due to typo?

Andreas

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-01  9:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-20 17:56 [Qemu-devel] [PATCH for-1.4?] isa: QOM'ify isa_bus_from_device() Andreas Färber
2013-01-20 18:16 ` Andreas Färber
2013-02-01  9:06   ` Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).