Re: [Qemu-devel] [PATCH 11/14] qbus: move get_fw_dev_path to DeviceClass
Il 02/05/2012 00:36, Andreas Färber ha scritto: Sorry, I reviewed the patches in mail reception order. ;) I meant 08/14 (qdev: convert busses to QEMU object model) where macros for other bus types were introduced. Seemed like an oversight. A lot of these were missing, and furthermore they should be in a header file. Paolo
Re: [Qemu-devel] [PATCH 11/14] qbus: move get_fw_dev_path to DeviceClass
Am 01.05.2012 20:18, schrieb Anthony Liguori: It should have never been a bus method. Signed-off-by: Anthony Liguori aligu...@us.ibm.com --- [...] diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 4a468f8..5044018 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -25,22 +25,13 @@ /* - */ -static char *idebus_get_fw_dev_path(DeviceState *dev); - #define TYPE_IDE_BUS IDE - -static void ide_bus_class_init(ObjectClass *klass, void *data) -{ -BusClass *k = BUS_CLASS(klass); - -k-get_fw_dev_path = idebus_get_fw_dev_path; -} +#define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) Move macro to preceding patch? Otherwise looks good. /-F -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Re: [Qemu-devel] [PATCH 11/14] qbus: move get_fw_dev_path to DeviceClass
On 05/01/2012 02:34 PM, Andreas Färber wrote: Am 01.05.2012 20:18, schrieb Anthony Liguori: It should have never been a bus method. Signed-off-by: Anthony Liguorialigu...@us.ibm.com --- [...] diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 4a468f8..5044018 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -25,22 +25,13 @@ /* - */ -static char *idebus_get_fw_dev_path(DeviceState *dev); - #define TYPE_IDE_BUS IDE - -static void ide_bus_class_init(ObjectClass *klass, void *data) -{ -BusClass *k = BUS_CLASS(klass); - -k-get_fw_dev_path = idebus_get_fw_dev_path; -} +#define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) Move macro to preceding patch? Otherwise looks good. Do you mean an independent patch? Regards, Anthony Liguori /-F
Re: [Qemu-devel] [PATCH 11/14] qbus: move get_fw_dev_path to DeviceClass
Am 02.05.2012 00:24, schrieb Anthony Liguori: On 05/01/2012 02:34 PM, Andreas Färber wrote: Am 01.05.2012 20:18, schrieb Anthony Liguori: +#define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS) Move macro to preceding patch? Do you mean an independent patch? Sorry, I reviewed the patches in mail reception order. ;) I meant 08/14 (qdev: convert busses to QEMU object model) where macros for other bus types were introduced. Seemed like an oversight. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg