qom: Use BUS()/DEVICE() macros instead of looking inside definitions
v2 cover qom: Use BUS()/DEVICE() macros instead of looking inside definitions
v1 was a simple patch:
'use qbus_reset_all() directly instead of qbus_reset_all_fn' where I was looking inside the definition of BusState.
Peter suggested to use the prefered QOM style, using the BUS/DEVICE macros. While here, I also cleaned the rest of the codebase.
Philippe Mathieu-Daudé (10):
hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly
hw/scsi: Use the QOM BUS() macro to access BusState.qbus hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus hw/s390x/event-facility: Use the QOM BUS() macro to access
BusState.qbus
hw/sd: Use the QOM BUS() macro to access BusState.qbus hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access
DeviceState.qdev
hw/audio/ac97.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/pci/pci_bridge.c | 2 +- hw/s390x/event-facility.c | 4 ++-- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/mptsas.c | 4 ++-- hw/scsi/virtio-scsi.c | 2 +- hw/scsi/vmw_pvscsi.c | 4 ++-- hw/sd/milkymist-memcard.c | 2 +- hw/sd/ssi-sd.c | 2 +- hw/usb/dev-storage.c | 2 +- hw/vfio/pci.c | 4 ++-- hw/watchdog/wdt_i6300esb.c | 2 +- 14 files changed, 18 insertions(+), 18 deletions(-)
Signature · 1 line
2.20.1
PATCH v2 1/10 hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly
Since the BusState is accesible from the SCSIBus object, it is pointless to use qbus_reset_all_fn.
Use qbus_reset_all() directly.
---
v2: Use BUS() macro (Peter Maydell)
One step toward removing qbus_reset_all_fn()
--- hw/scsi/vmw_pvscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/scsi/vmw_pvscsi.c +2 -2
@@ -440,7 +440,7 @@ static void pvscsi_reset_adapter(PVSCSIState *s) { s->resetting++; -qbus_reset_all_fn (&s->bus); +qbus_reset_all (BUS (&s->bus)); s->resetting--;pvscsi_process_completion_queue (s);assert (QTAILQ_EMPTY (&s->pending_queue));
@@ -848,7 +848,7 @@ pvscsi_on_cmd_reset_bus(PVSCSIState *s)trace_pvscsi_on_cmd_arrived ("PVSCSI_CMD_RESET_BUS" ); s->resetting++; -qbus_reset_all_fn (&s->bus); +qbus_reset_all (BUS (&s->bus)); s->resetting--;return PVSCSI_COMMAND_PROCESSING_SUCCEEDED ; }
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 01/10] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly
Quoted 40 lines · Philippe Mathieu-Daudé
Since the BusState is accesible from the SCSIBus object, it is pointless to use
qbus_reset_all_fn.
Useqbus_reset_all()directly.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: UseBUS()macro (Peter Maydell)One step toward removing
qbus_reset_all_fn()
---hw/scsi/vmw_pvscsi.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)hw/scsi/vmw_pvscsi.c +2
-2@@ -440,7 +440,7 @@ static void pvscsi_reset_adapter(PVSCSIState *s) { s->resetting++; -qbus_reset_all_fn (&s->bus); +qbus_reset_all (BUS (&s->bus)); s->resetting--;pvscsi_process_completion_queue (s);assert (QTAILQ_EMPTY (&s->pending_queue));@@ -848,7 +848,7 @@ pvscsi_on_cmd_reset_bus(PVSCSIState *s)trace_pvscsi_on_cmd_arrived ("PVSCSI_CMD_RESET_BUS" ); s->resetting++; -qbus_reset_all_fn (&s->bus); +qbus_reset_all (BUS (&s->bus)); s->resetting--;return PVSCSI_COMMAND_PROCESSING_SUCCEEDED ; }Signature · 1 line
2.20.1
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 01/10] hw/scsi/vmw_pvscsi: Use qbus_reset_all() directly
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 28 lines
Since the BusState is accesible from the SCSIBus object, it is pointless to use
qbus_reset_all_fn.
Useqbus_reset_all()directly.Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
v2: UseBUS()macro (Peter Maydell)One step toward removing
qbus_reset_all_fn()--- hw/scsi/vmw_pvscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/scsi/vmw_pvscsi.c +1
-1@@ -440,7 +440,7 @@ static void pvscsi_reset_adapter(PVSCSIState *s) { s->resetting++; -qbus_reset_all_fn (&s->bus); +qbus_reset_all (BUS (&s->bus)); s->resetting--;pvscsi_process_completion_queue (s);assert (QTAILQ_EMPTY (&s->pending_queue));
hw/scsi/vmw_pvscsi.c pvscsi_on_cmd_reset_bus(PVSCSIState *s) · line 854
Quoted 8 lines
hw/scsi/vmw_pvscsi.c +1
-1@@ -848,7 +848,7 @@ pvscsi_on_cmd_reset_bus(PVSCSIState *s)trace_pvscsi_on_cmd_arrived ("PVSCSI_CMD_RESET_BUS" ); s->resetting++; -qbus_reset_all_fn (&s->bus); +qbus_reset_all (BUS (&s->bus)); s->resetting--;return PVSCSI_COMMAND_PROCESSING_SUCCEEDED ; }
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 2/10 hw/scsi: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".
This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus
@use_bus_macro_to_access_qbus@
expression obj;
identifier bus;
@@
-&obj->bus.qbus
+BUS(&obj->bus)--- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/mptsas.c | 4 ++-- hw/scsi/virtio-scsi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
hw/scsi/lsi53c895a.c +1 -1
@@ -1860,7 +1860,7 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val) }if (val &LSI_SCNTL1_RST ) {if (!(s->sstat0 &LSI_SSTAT0_RST )) { -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus)); s->sstat0 |=LSI_SSTAT0_RST ;lsi_script_scsi_interrupt (s,LSI_SIST0_RST ,0 ); }
hw/scsi/mptsas.c +2 -2
@@ -540,7 +540,7 @@ reply_maybe_async:break ;case MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS : -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus));break ;default :
@@ -803,7 +803,7 @@ static void mptsas_soft_reset(MPTSASState *s) s->intr_mask =MPI_HIM_DIM |MPI_HIM_RIM ;mptsas_update_interrupt (s); -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus)); s->intr_status =0 ; s->intr_mask = save_mask;
hw/scsi/virtio-scsi.c +1 -1
@@ -696,7 +696,7 @@ static void virtio_scsi_reset(VirtIODevice *vdev)assert (!s->dataplane_started); s->resetting++; -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus)); s->resetting--; vs->sense_size =VIRTIO_SCSI_SENSE_DEFAULT_SIZE ;
Signature · 1 line
2.20.1
Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 02/10] hw/scsi: Use the QOM BUS() macro to access BusState.qbus
Le 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 13 lines
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)
Quoted 8 lines
Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/mptsas.c | 4 ++-- hw/scsi/virtio-scsi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 02/10] hw/scsi: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 62 lines
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/scsi/lsi53c895a.c | 2 +- hw/scsi/mptsas.c | 4 ++-- hw/scsi/virtio-scsi.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)hw/scsi/lsi53c895a.c +1
-1@@ -1860,7 +1860,7 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val) }if (val &LSI_SCNTL1_RST ) {if (!(s->sstat0 &LSI_SSTAT0_RST )) { -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus)); s->sstat0 |=LSI_SSTAT0_RST ;lsi_script_scsi_interrupt (s,LSI_SIST0_RST ,0 ); }hw/scsi/mptsas.c +2
-2@@ -540,7 +540,7 @@ reply_maybe_async:break ;case MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS : -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus));break ;default :@@ -803,7 +803,7 @@ static void mptsas_soft_reset(MPTSASState *s) s->intr_mask =MPI_HIM_DIM |MPI_HIM_RIM ;mptsas_update_interrupt (s); -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus)); s->intr_status =0 ; s->intr_mask = save_mask;hw/scsi/virtio-scsi.c +0
-0
hw/scsi/virtio-scsi.c static void virtio_scsi_reset(VirtIODevice *vdev) · line 702
Quoted 8 lines
hw/scsi/virtio-scsi.c +1
-1@@ -696,7 +696,7 @@ static void virtio_scsi_reset(VirtIODevice *vdev)assert (!s->dataplane_started); s->resetting++; -qbus_reset_all (&s->bus.qbus); +qbus_reset_all (BUS (&s->bus)); s->resetting--; vs->sense_size =VIRTIO_SCSI_SENSE_DEFAULT_SIZE ;
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 3/10 hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".
This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus
@use_bus_macro_to_access_qbus@
expression obj;
identifier bus;
@@
-&obj->bus.qbus
+BUS(&obj->bus)--- hw/pci/pci_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/pci/pci_bridge.c +1 -1
@@ -273,7 +273,7 @@ void pci_bridge_write_config(PCIDevice *d, newctl =pci_get_word (d->config +PCI_BRIDGE_CONTROL );if (~oldctl & newctl &PCI_BRIDGE_CTL_BUS_RESET ) {/* Trigger hot reset on 0->1 transition. */ -qbus_reset_all (&s->sec_bus.qbus); +qbus_reset_all (BUS (&s->sec_bus)); } }
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 03/10] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus
Quoted 24 lines · Philippe Mathieu-Daudé
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/pci/pci_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/pci/pci_bridge.c +0
-0
hw/pci/pci_bridge.c void pci_bridge_write_config(PCIDevice *d, · line 279
Quoted 8 lines
hw/pci/pci_bridge.c +1
-1@@ -273,7 +273,7 @@ void pci_bridge_write_config(PCIDevice *d, newctl =pci_get_word (d->config +PCI_BRIDGE_CONTROL );if (~oldctl & newctl &PCI_BRIDGE_CTL_BUS_RESET ) {/* Trigger hot reset on 0->1 transition. */ -qbus_reset_all (&s->sec_bus.qbus); +qbus_reset_all (BUS (&s->sec_bus)); } }
Thanks,
Marcel
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 03/10] hw/pci-bridge: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 25 lines
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/pci/pci_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/pci/pci_bridge.c +0
-0
hw/pci/pci_bridge.c void pci_bridge_write_config(PCIDevice *d, · line 279
Quoted 8 lines
hw/pci/pci_bridge.c +1
-1@@ -273,7 +273,7 @@ void pci_bridge_write_config(PCIDevice *d, newctl =pci_get_word (d->config +PCI_BRIDGE_CONTROL );if (~oldctl & newctl &PCI_BRIDGE_CTL_BUS_RESET ) {/* Trigger hot reset on 0->1 transition. */ -qbus_reset_all (&s->sec_bus.qbus); +qbus_reset_all (BUS (&s->sec_bus)); } }
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 4/10 hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".
This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus
@use_bus_macro_to_access_qbus@
expression obj;
identifier bus;
@@
-&obj->bus.qbus
+BUS(&obj->bus)--- hw/s390x/event-facility.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/s390x/event-facility.c +2 -2
@@ -466,12 +466,12 @@ static void init_event_facility(Object *obj) new =object_new (TYPE_SCLP_QUIESCE );object_property_add_child (obj,TYPE_SCLP_QUIESCE , new,NULL );object_unref (new); -qdev_set_parent_bus (DEVICE (new), &event_facility->sbus.qbus); +qdev_set_parent_bus (DEVICE (new),BUS (&event_facility->sbus)); new =object_new (TYPE_SCLP_CPU_HOTPLUG );object_property_add_child (obj,TYPE_SCLP_CPU_HOTPLUG , new,NULL );object_unref (new); -qdev_set_parent_bus (DEVICE (new), &event_facility->sbus.qbus); +qdev_set_parent_bus (DEVICE (new),BUS (&event_facility->sbus));/* the facility will automatically realize the devices via the bus */ }
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 04/10] hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus
Quoted 13 lines · On Tue, 28 May 2019 18:40:14 +0200 Philippe Mathieu-Daudé <[email protected]>…
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)
Quoted 5 lines
Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/s390x/event-facility.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
(I assume this will go through the trivial tree?)
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 04/10] hw/s390x/event-facility: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 29 lines
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/s390x/event-facility.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/s390x/event-facility.c +0
-1@@ -466,12 +466,12 @@ static void init_event_facility(Object *obj) new =object_new (TYPE_SCLP_QUIESCE );object_property_add_child (obj,TYPE_SCLP_QUIESCE , new,NULL );object_unref (new); -qdev_set_parent_bus (DEVICE (new), &event_facility->sbus.qbus);
hw/s390x/event-facility.c static void init_event_facility(Object *obj) · line 477
Quoted 10 lines
hw/s390x/event-facility.c +2
-1+qdev_set_parent_bus (DEVICE (new),BUS (&event_facility->sbus)); new =object_new (TYPE_SCLP_CPU_HOTPLUG );object_property_add_child (obj,TYPE_SCLP_CPU_HOTPLUG , new,NULL );object_unref (new); -qdev_set_parent_bus (DEVICE (new), &event_facility->sbus.qbus); +qdev_set_parent_bus (DEVICE (new),BUS (&event_facility->sbus));/* the facility will automatically realize the devices via the bus */ }
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 5/10 hw/sd: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".
This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus
@use_bus_macro_to_access_qbus@
expression obj;
identifier bus;
@@
-&obj->bus.qbus
+BUS(&obj->bus)--- hw/sd/milkymist-memcard.c | 2 +- hw/sd/ssi-sd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/sd/milkymist-memcard.c +1 -1
@@ -277,7 +277,7 @@ static void milkymist_memcard_realize(DeviceState *dev, Error **errp)/* FIXME use a qdev drive property instead of drive_get_next() */ dinfo =drive_get_next (IF_SD ); blk = dinfo ?blk_by_legacy_dinfo (dinfo) :NULL ; - carddev =qdev_create (&s->sdbus.qbus,TYPE_SD_CARD ); + carddev =qdev_create (BUS (&s->sdbus),TYPE_SD_CARD );qdev_prop_set_drive (carddev,"drive" , blk, &err);object_property_set_bool (OBJECT (carddev), true,"realized" , &err);if (err) {
hw/sd/ssi-sd.c +1 -1
@@ -249,7 +249,7 @@ static void ssi_sd_realize(SSISlave *d, Error **errp)/* Create and plug in the sd card */ /* FIXME use a qdev drive property instead of drive_get_next() */ dinfo =drive_get_next (IF_SD ); - carddev =qdev_create (&s->sdbus.qbus,TYPE_SD_CARD ); + carddev =qdev_create (BUS (&s->sdbus),TYPE_SD_CARD );if (dinfo) {qdev_prop_set_drive (carddev,"drive" ,blk_by_legacy_dinfo (dinfo), &err); }
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 05/10] hw/sd: Use the QOM BUS() macro to access BusState.qbus
Quoted 14 lines · Philippe Mathieu-Daudé
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)
Quoted 6 lines
Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/sd/milkymist-memcard.c | 2 +- hw/sd/ssi-sd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
thanks
-- PMM
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 05/10] hw/sd: Use the QOM BUS() macro to access BusState.qbus
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 39 lines
Rather than looking inside the definition of a BusState with "
s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)".This patch was generated using the following Coccinelle script:
// Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/sd/milkymist-memcard.c | 2 +- hw/sd/ssi-sd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/sd/milkymist-memcard.c +1
-1@@ -277,7 +277,7 @@ static void milkymist_memcard_realize(DeviceState *dev, Error **errp)/* FIXME use a qdev drive property instead of drive_get_next() */ dinfo =drive_get_next (IF_SD ); blk = dinfo ?blk_by_legacy_dinfo (dinfo) :NULL ; - carddev =qdev_create (&s->sdbus.qbus,TYPE_SD_CARD ); + carddev =qdev_create (BUS (&s->sdbus),TYPE_SD_CARD );qdev_prop_set_drive (carddev,"drive" , blk, &err);object_property_set_bool (OBJECT (carddev), true,"realized" , &err);if (err) {hw/sd/ssi-sd.c +0
-0
hw/sd/ssi-sd.c static void ssi_sd_realize(SSISlave *d, Error **errp) · line 255
Quoted 8 lines
hw/sd/ssi-sd.c +1
-1@@ -249,7 +249,7 @@ static void ssi_sd_realize(SSISlave *d, Error **errp)/* Create and plug in the sd card */ /* FIXME use a qdev drive property instead of drive_get_next() */ dinfo =drive_get_next (IF_SD ); - carddev =qdev_create (&s->sdbus.qbus,TYPE_SD_CARD ); + carddev =qdev_create (BUS (&s->sdbus),TYPE_SD_CARD );if (dinfo) {qdev_prop_set_drive (carddev,"drive" ,blk_by_legacy_dinfo (dinfo), &err); }
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 6/10 hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)".
This patch was generated using the following Coccinelle script (with a bit of manual fix-up, removing an extra space to please checkpatch.pl):
// Use DEVICE() macros to access DeviceState.qdev
@use_device_macro_to_access_qdev@
expression obj;
identifier dev;
@@
-&obj->dev.qdev
+DEVICE(obj)--- hw/audio/ac97.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/audio/ac97.c +1 -1
@@ -1388,7 +1388,7 @@ static void ac97_realize(PCIDevice *dev, Error **errp)pci_register_bar (&s->dev,0 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io_nam);pci_register_bar (&s->dev,1 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io_nabm);AUD_register_card ("ac97" , &s->card); -ac97_on_reset (&s->dev.qdev); +ac97_on_reset (DEVICE (s)); }static void ac97_exit (PCIDevice *dev)
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 06/10] hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev
Quoted 27 lines · Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script (with a bit of manual fix-up, removing an extra space to please checkpatch.pl):
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/audio/ac97.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/audio/ac97.c +0
-0
hw/audio/ac97.c static void ac97_realize(PCIDevice *dev, Error **errp) · line 1392
Quoted 6 lines
hw/audio/ac97.c +1
-1@@ -1388,7 +1388,7 @@ static void ac97_realize(PCIDevice *dev, Error **errp)pci_register_bar (&s->dev,0 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io_nam);pci_register_bar (&s->dev,1 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io_nabm);AUD_register_card ("ac97" , &s->card); -ac97_on_reset (&s->dev.qdev); +ac97_on_reset (DEVICE (s)); }
As an aside, this function has a lot of uses of "&s->dev" to get the PCIDevice* given an AC97LinkState*. This isn't necessary as the function has been passed the PCIDevice* as its argument, so all the uses of "&s->dev" here could just be written as "dev".
thanks
-- PMM
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 06/10] hw/audio/ac97: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 27 lines
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script (with a bit of manual fix-up, removing an extra space to please checkpatch.pl):
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/audio/ac97.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/audio/ac97.c +0
-0
hw/audio/ac97.c static void ac97_realize(PCIDevice *dev, Error **errp) · line 1394
Quoted 8 lines
hw/audio/ac97.c +1
-1@@ -1388,7 +1388,7 @@ static void ac97_realize(PCIDevice *dev, Error **errp)pci_register_bar (&s->dev,0 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io_nam);pci_register_bar (&s->dev,1 ,PCI_BASE_ADDRESS_SPACE_IO , &s->io_nabm);AUD_register_card ("ac97" , &s->card); -ac97_on_reset (&s->dev.qdev); +ac97_on_reset (DEVICE (s)); }static void ac97_exit (PCIDevice *dev)
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 7/10 hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)".
This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev
@use_device_macro_to_access_qdev@
expression obj;
identifier dev;
@@
-&obj->dev.qdev
+DEVICE(obj)--- hw/isa/lpc_ich9.c | 2 +- hw/isa/vt82c686.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/isa/lpc_ich9.c +1 -1
@@ -412,7 +412,7 @@ void ich9_lpc_pm_init(PCIDevice *lpc_pci, bool smm_enabled) true); } -ich9_lpc_reset (&lpc->d.qdev); +ich9_lpc_reset (DEVICE (lpc)); }/* APM */
hw/isa/vt82c686.c +1 -1
@@ -369,7 +369,7 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) pci_conf[0x90 ] = s->smb_io_base |1 ; pci_conf[0x91 ] = s->smb_io_base >>8 ; pci_conf[0xd2 ] =0x90 ; -pm_smbus_init (&s->dev.qdev, &s->smb, false); +pm_smbus_init (DEVICE (s), &s->smb, false);memory_region_add_subregion (get_system_io (), s->smb_io_base, &s->smb.io);apm_init (dev, &s->apm,NULL , s);
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 07/10] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev
Quoted 38 lines · Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/isa/lpc_ich9.c | 2 +- hw/isa/vt82c686.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/isa/lpc_ich9.c +1
-1@@ -412,7 +412,7 @@ void ich9_lpc_pm_init(PCIDevice *lpc_pci, bool smm_enabled) true); } -ich9_lpc_reset (&lpc->d.qdev); +ich9_lpc_reset (DEVICE (lpc)); }/* APM */ hw/isa/vt82c686.c +0
-0
hw/isa/vt82c686.c static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) · line 375
Quoted 8 lines
hw/isa/vt82c686.c +1
-1@@ -369,7 +369,7 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) pci_conf[0x90 ] = s->smb_io_base |1 ; pci_conf[0x91 ] = s->smb_io_base >>8 ; pci_conf[0xd2 ] =0x90 ; -pm_smbus_init (&s->dev.qdev, &s->smb, false); +pm_smbus_init (DEVICE (s), &s->smb, false);memory_region_add_subregion (get_system_io (), s->smb_io_base, &s->smb.io);apm_init (dev, &s->apm,NULL , s);
Thanks,
Marcel
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 07/10] hw/isa: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 39 lines
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/isa/lpc_ich9.c | 2 +- hw/isa/vt82c686.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/isa/lpc_ich9.c +1
-1@@ -412,7 +412,7 @@ void ich9_lpc_pm_init(PCIDevice *lpc_pci, bool smm_enabled) true); } -ich9_lpc_reset (&lpc->d.qdev); +ich9_lpc_reset (DEVICE (lpc)); }/* APM */ hw/isa/vt82c686.c +0
-0
hw/isa/vt82c686.c static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) · line 375
Quoted 8 lines
hw/isa/vt82c686.c +1
-1@@ -369,7 +369,7 @@ static void vt82c686b_pm_realize(PCIDevice *dev, Error **errp) pci_conf[0x90 ] = s->smb_io_base |1 ; pci_conf[0x91 ] = s->smb_io_base >>8 ; pci_conf[0xd2 ] =0x90 ; -pm_smbus_init (&s->dev.qdev, &s->smb, false); +pm_smbus_init (DEVICE (s), &s->smb, false);memory_region_add_subregion (get_system_io (), s->smb_io_base, &s->smb.io);apm_init (dev, &s->apm,NULL , s);
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 8/10 hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)".
This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev
@use_device_macro_to_access_qdev@
expression obj;
identifier dev;
@@
-&obj->dev.qdev
+DEVICE(obj)--- hw/usb/dev-storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/usb/dev-storage.c +1 -1
@@ -616,7 +616,7 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)* The hack is probably a bad idea. */ blk_ref (blk); -blk_detach_dev (blk, &s->dev.qdev); +blk_detach_dev (blk,DEVICE (s)); s->conf.blk =NULL ;usb_desc_create_serial (dev);
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 08/10] hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev
Quoted 13 lines · Philippe Mathieu-Daudé
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)
Quoted 2 lines
Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 08/10] hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 25 lines
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/usb/dev-storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/usb/dev-storage.c +0
-0
hw/usb/dev-storage.c static void usb_msd_storage_realize(USBDevice *dev, Error **errp) · line 622
Quoted 8 lines
hw/usb/dev-storage.c +1
-1@@ -616,7 +616,7 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)* The hack is probably a bad idea. */ blk_ref (blk); -blk_detach_dev (blk, &s->dev.qdev); +blk_detach_dev (blk,DEVICE (s)); s->conf.blk =NULL ;usb_desc_create_serial (dev);
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 9/10 hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)".
This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev
@use_device_macro_to_access_qdev@
expression obj;
identifier dev;
@@
-&obj->dev.qdev
+DEVICE(obj)--- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/vfio/pci.c +2 -2
@@ -2717,7 +2717,7 @@ static void vfio_req_notifier_handler(void *opaque)return ; } -qdev_unplug (&vdev->pdev.qdev, &err); +qdev_unplug (DEVICE (vdev), &err);if (err) {warn_reportf_err (err,VFIO_MSG_PREFIX , vdev->vbasedev.name); }
@@ -2839,7 +2839,7 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) vdev->vbasedev.name =g_path_get_basename (vdev->vbasedev.sysfsdev); vdev->vbasedev.ops = &vfio_pci_ops; vdev->vbasedev.type =VFIO_DEVICE_TYPE_PCI ; - vdev->vbasedev.dev = &vdev->pdev.qdev; + vdev->vbasedev.dev =DEVICE (vdev); tmp =g_strdup_printf ("%s/iommu_group" , vdev->vbasedev.sysfsdev); len =readlink (tmp, group_path,sizeof (group_path));
Signature · 1 line
2.20.1
Re: [Qemu-devel] [PATCH v2 09/10] hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev
Quoted 13 lines · On Tue, 28 May 2019 18:40:19 +0200 Philippe Mathieu-Daudé <[email protected]>…
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)
Quoted 5 lines
Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 22 lines
hw/vfio/pci.c +2
-2@@ -2717,7 +2717,7 @@ static void vfio_req_notifier_handler(void *opaque)return ; } -qdev_unplug (&vdev->pdev.qdev, &err); +qdev_unplug (DEVICE (vdev), &err);if (err) {warn_reportf_err (err,VFIO_MSG_PREFIX , vdev->vbasedev.name); }@@ -2839,7 +2839,7 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) vdev->vbasedev.name =g_path_get_basename (vdev->vbasedev.sysfsdev); vdev->vbasedev.ops = &vfio_pci_ops; vdev->vbasedev.type =VFIO_DEVICE_TYPE_PCI ; - vdev->vbasedev.dev = &vdev->pdev.qdev; + vdev->vbasedev.dev =DEVICE (vdev); tmp =g_strdup_printf ("%s/iommu_group" , vdev->vbasedev.sysfsdev); len =readlink (tmp, group_path,sizeof (group_path));
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 09/10] hw/vfio/pci: Use the QOM DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 34 lines
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/vfio/pci.c +1
-1@@ -2717,7 +2717,7 @@ static void vfio_req_notifier_handler(void *opaque)return ; } -qdev_unplug (&vdev->pdev.qdev, &err); +qdev_unplug (DEVICE (vdev), &err);if (err) {warn_reportf_err (err,VFIO_MSG_PREFIX , vdev->vbasedev.name); }
hw/vfio/pci.c static void vfio_realize(PCIDevice *pdev, Error **errp) · line 2845
Quoted 8 lines
hw/vfio/pci.c +1
-1@@ -2839,7 +2839,7 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) vdev->vbasedev.name =g_path_get_basename (vdev->vbasedev.sysfsdev); vdev->vbasedev.ops = &vfio_pci_ops; vdev->vbasedev.type =VFIO_DEVICE_TYPE_PCI ; - vdev->vbasedev.dev = &vdev->pdev.qdev; + vdev->vbasedev.dev =DEVICE (vdev); tmp =g_strdup_printf ("%s/iommu_group" , vdev->vbasedev.sysfsdev); len =readlink (tmp, group_path,sizeof (group_path));
Applied to my trivial-patches branch.
Thanks,
Laurent
PATCH v2 10/10 hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéRather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)".
This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev
@use_device_macro_to_access_qdev@
expression obj;
identifier dev;
@@
-&obj->dev.qdev
+DEVICE(obj)--- hw/watchdog/wdt_i6300esb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/watchdog/wdt_i6300esb.c +1 -1
@@ -200,7 +200,7 @@ static void i6300esb_timer_expired(void *vp)if (d->reboot_enabled) { d->previous_reboot_flag =1 ;watchdog_perform_action ();/* This reboots, exits, etc */ -i6300esb_reset (&d->dev.qdev); +i6300esb_reset (DEVICE (d)); }/* In "free running mode" we start stage 1 again. */
Signature · 1 line
2.20.1
Re: [Qemu-devel] [Qemu-trivial] [PATCH v2 10/10] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev
Le 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 13 lines
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)
Quoted 5 lines
Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/watchdog/wdt_i6300esb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Laurent Vivier
AppliedRe: [Qemu-devel] [Qemu-trivial] [PATCH v2 10/10] hw/watchdog/wdt_i6300esb: Use DEVICE() macro to access DeviceState.qdev
In reply to Philippe Mathieu-DaudéLe 28/05/2019 à 18:40, Philippe Mathieu-Daudé a écrit :
Quoted 25 lines
Rather than looking inside the definition of a DeviceState with "
s->qdev", use the QOM prefered style: "DEVICE(s)".This patch was generated using the following Coccinelle script:
// Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj)Suggested-by Peter Maydell <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/watchdog/wdt_i6300esb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/watchdog/wdt_i6300esb.c +0
-0
hw/watchdog/wdt_i6300esb.c static void i6300esb_timer_expired(void *vp) · line 206
Quoted 8 lines
hw/watchdog/wdt_i6300esb.c +1
-1@@ -200,7 +200,7 @@ static void i6300esb_timer_expired(void *vp)if (d->reboot_enabled) { d->previous_reboot_flag =1 ;watchdog_perform_action ();/* This reboots, exits, etc */ -i6300esb_reset (&d->dev.qdev); +i6300esb_reset (DEVICE (d)); }/* In "free running mode" we start stage 1 again. */
Applied to my trivial-patches branch.
Thanks,
Laurent