* [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size
@ 2020-08-24 21:59 Eduardo Habkost
2020-08-24 21:59 ` [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size Eduardo Habkost
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
This changes existing QOM boilerplate to use existing typedef
names when setting instance_size and class_size on TypeInfo
variables. This makes the code more consistent and will make
future conversion to QOM type declaration macros easier.
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org
Eduardo Habkost (6):
xilinx_axidma: Use typedef name for instance_size
omap_intc: Use typedef name for instance_size
lpc_ich9: Use typedef name for instance_size
xilinx_axienet: Use typedef name for instance_size
vhost-user-vga: Use typedef name for instance_size
virtio-vga: Use typedef name for instance_size
hw/display/vhost-user-vga.c | 2 +-
hw/display/virtio-vga.c | 6 +++---
hw/dma/xilinx_axidma.c | 4 ++--
hw/intc/omap_intc.c | 2 +-
hw/isa/lpc_ich9.c | 2 +-
hw/net/xilinx_axienet.c | 4 ++--
6 files changed, 10 insertions(+), 10 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
@ 2020-08-24 21:59 ` Eduardo Habkost
2020-08-24 21:59 ` [PATCH 2/6] omap_intc: " Eduardo Habkost
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
This makes the code consistent with the rest of QOM code in QEMU,
and will make automated conversion to type declaration macros
simpler.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org
---
hw/dma/xilinx_axidma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index a4812e480a..5ad8bd3d2e 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -634,7 +634,7 @@ static const TypeInfo axidma_info = {
static const TypeInfo xilinx_axidma_data_stream_info = {
.name = TYPE_XILINX_AXI_DMA_DATA_STREAM,
.parent = TYPE_OBJECT,
- .instance_size = sizeof(struct XilinxAXIDMAStreamSlave),
+ .instance_size = sizeof(XilinxAXIDMAStreamSlave),
.class_init = xilinx_axidma_stream_class_init,
.class_data = &xilinx_axidma_data_stream_class,
.interfaces = (InterfaceInfo[]) {
@@ -646,7 +646,7 @@ static const TypeInfo xilinx_axidma_data_stream_info = {
static const TypeInfo xilinx_axidma_control_stream_info = {
.name = TYPE_XILINX_AXI_DMA_CONTROL_STREAM,
.parent = TYPE_OBJECT,
- .instance_size = sizeof(struct XilinxAXIDMAStreamSlave),
+ .instance_size = sizeof(XilinxAXIDMAStreamSlave),
.class_init = xilinx_axidma_stream_class_init,
.class_data = &xilinx_axidma_control_stream_class,
.interfaces = (InterfaceInfo[]) {
--
2.26.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/6] omap_intc: Use typedef name for instance_size
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
2020-08-24 21:59 ` [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size Eduardo Habkost
@ 2020-08-24 21:59 ` Eduardo Habkost
2020-08-24 21:59 ` [PATCH 3/6] lpc_ich9: " Eduardo Habkost
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
This makes the code consistent with the rest of QOM code in QEMU,
and will make automated conversion to type declaration macros
simpler.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org
---
hw/intc/omap_intc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c
index b8a1d1fd7d..d7183d035e 100644
--- a/hw/intc/omap_intc.c
+++ b/hw/intc/omap_intc.c
@@ -676,7 +676,7 @@ static const TypeInfo omap2_intc_info = {
static const TypeInfo omap_intc_type_info = {
.name = TYPE_OMAP_INTC,
.parent = TYPE_SYS_BUS_DEVICE,
- .instance_size = sizeof(struct omap_intr_handler_s),
+ .instance_size = sizeof(omap_intr_handler),
.abstract = true,
};
--
2.26.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/6] lpc_ich9: Use typedef name for instance_size
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
2020-08-24 21:59 ` [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size Eduardo Habkost
2020-08-24 21:59 ` [PATCH 2/6] omap_intc: " Eduardo Habkost
@ 2020-08-24 21:59 ` Eduardo Habkost
2020-08-24 21:59 ` [PATCH 4/6] xilinx_axienet: " Eduardo Habkost
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
This makes the code consistent with the rest of QOM code in QEMU,
and will make automated conversion to type declaration macros
simpler.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: qemu-devel@nongnu.org
---
hw/isa/lpc_ich9.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index cd6e169d47..3303d2eab6 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -792,7 +792,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)
static const TypeInfo ich9_lpc_info = {
.name = TYPE_ICH9_LPC_DEVICE,
.parent = TYPE_PCI_DEVICE,
- .instance_size = sizeof(struct ICH9LPCState),
+ .instance_size = sizeof(ICH9LPCState),
.instance_init = ich9_lpc_initfn,
.class_init = ich9_lpc_class_init,
.interfaces = (InterfaceInfo[]) {
--
2.26.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/6] xilinx_axienet: Use typedef name for instance_size
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
` (2 preceding siblings ...)
2020-08-24 21:59 ` [PATCH 3/6] lpc_ich9: " Eduardo Habkost
@ 2020-08-24 21:59 ` Eduardo Habkost
2020-08-24 22:21 ` Alistair Francis
2020-08-24 21:59 ` [PATCH 5/6] vhost-user-vga: " Eduardo Habkost
` (2 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
This makes the code consistent with the rest of QOM code in QEMU,
and will make automated conversion to type declaration macros
simpler.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: Alistair Francis <alistair@alistair23.me>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-arm@nongnu.org
Cc: qemu-devel@nongnu.org
---
hw/net/xilinx_axienet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 1e48eb70c9..ceb4652938 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -1069,7 +1069,7 @@ static const TypeInfo xilinx_enet_info = {
static const TypeInfo xilinx_enet_data_stream_info = {
.name = TYPE_XILINX_AXI_ENET_DATA_STREAM,
.parent = TYPE_OBJECT,
- .instance_size = sizeof(struct XilinxAXIEnetStreamSlave),
+ .instance_size = sizeof(XilinxAXIEnetStreamSlave),
.class_init = xilinx_enet_data_stream_class_init,
.interfaces = (InterfaceInfo[]) {
{ TYPE_STREAM_SLAVE },
@@ -1080,7 +1080,7 @@ static const TypeInfo xilinx_enet_data_stream_info = {
static const TypeInfo xilinx_enet_control_stream_info = {
.name = TYPE_XILINX_AXI_ENET_CONTROL_STREAM,
.parent = TYPE_OBJECT,
- .instance_size = sizeof(struct XilinxAXIEnetStreamSlave),
+ .instance_size = sizeof(XilinxAXIEnetStreamSlave),
.class_init = xilinx_enet_control_stream_class_init,
.interfaces = (InterfaceInfo[]) {
{ TYPE_STREAM_SLAVE },
--
2.26.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/6] vhost-user-vga: Use typedef name for instance_size
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
` (3 preceding siblings ...)
2020-08-24 21:59 ` [PATCH 4/6] xilinx_axienet: " Eduardo Habkost
@ 2020-08-24 21:59 ` Eduardo Habkost
2020-08-24 21:59 ` [PATCH 6/6] virtio-vga: " Eduardo Habkost
2020-09-04 18:21 ` [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
6 siblings, 0 replies; 10+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
This makes the code consistent with the rest of QOM code in QEMU,
and will make automated conversion to type declaration macros
simpler.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/display/vhost-user-vga.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/vhost-user-vga.c b/hw/display/vhost-user-vga.c
index 1690f6b610..78f58bd340 100644
--- a/hw/display/vhost-user-vga.c
+++ b/hw/display/vhost-user-vga.c
@@ -39,7 +39,7 @@ static void vhost_user_vga_inst_initfn(Object *obj)
static const VirtioPCIDeviceTypeInfo vhost_user_vga_info = {
.generic_name = TYPE_VHOST_USER_VGA,
.parent = TYPE_VIRTIO_VGA_BASE,
- .instance_size = sizeof(struct VhostUserVGA),
+ .instance_size = sizeof(VhostUserVGA),
.instance_init = vhost_user_vga_inst_initfn,
};
--
2.26.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 6/6] virtio-vga: Use typedef name for instance_size
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
` (4 preceding siblings ...)
2020-08-24 21:59 ` [PATCH 5/6] vhost-user-vga: " Eduardo Habkost
@ 2020-08-24 21:59 ` Eduardo Habkost
2020-08-25 5:50 ` Gerd Hoffmann
2020-09-04 18:21 ` [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
6 siblings, 1 reply; 10+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:59 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
This makes the code consistent with the rest of QOM code in QEMU,
and will make automated conversion to type declaration macros
simpler.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/display/virtio-vga.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index f533d7d1b4..7c995ddc81 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -194,8 +194,8 @@ static void virtio_vga_base_class_init(ObjectClass *klass, void *data)
static TypeInfo virtio_vga_base_info = {
.name = TYPE_VIRTIO_VGA_BASE,
.parent = TYPE_VIRTIO_PCI,
- .instance_size = sizeof(struct VirtIOVGABase),
- .class_size = sizeof(struct VirtIOVGABaseClass),
+ .instance_size = sizeof(VirtIOVGABase),
+ .class_size = sizeof(VirtIOVGABaseClass),
.class_init = virtio_vga_base_class_init,
.abstract = true,
};
@@ -224,7 +224,7 @@ static void virtio_vga_inst_initfn(Object *obj)
static VirtioPCIDeviceTypeInfo virtio_vga_info = {
.generic_name = TYPE_VIRTIO_VGA,
.parent = TYPE_VIRTIO_VGA_BASE,
- .instance_size = sizeof(struct VirtIOVGA),
+ .instance_size = sizeof(VirtIOVGA),
.instance_init = virtio_vga_inst_initfn,
};
--
2.26.2
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 4/6] xilinx_axienet: Use typedef name for instance_size
2020-08-24 21:59 ` [PATCH 4/6] xilinx_axienet: " Eduardo Habkost
@ 2020-08-24 22:21 ` Alistair Francis
0 siblings, 0 replies; 10+ messages in thread
From: Alistair Francis @ 2020-08-24 22:21 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-devel@nongnu.org Developers, qemu-arm, Gerd Hoffmann,
Edgar E. Iglesias, Marc-André Lureau
On Mon, Aug 24, 2020 at 3:02 PM Eduardo Habkost <ehabkost@redhat.com> wrote:
>
> This makes the code consistent with the rest of QOM code in QEMU,
> and will make automated conversion to type declaration macros
> simpler.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
> Cc: Alistair Francis <alistair@alistair23.me>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: qemu-arm@nongnu.org
> Cc: qemu-devel@nongnu.org
> ---
> hw/net/xilinx_axienet.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
> index 1e48eb70c9..ceb4652938 100644
> --- a/hw/net/xilinx_axienet.c
> +++ b/hw/net/xilinx_axienet.c
> @@ -1069,7 +1069,7 @@ static const TypeInfo xilinx_enet_info = {
> static const TypeInfo xilinx_enet_data_stream_info = {
> .name = TYPE_XILINX_AXI_ENET_DATA_STREAM,
> .parent = TYPE_OBJECT,
> - .instance_size = sizeof(struct XilinxAXIEnetStreamSlave),
> + .instance_size = sizeof(XilinxAXIEnetStreamSlave),
> .class_init = xilinx_enet_data_stream_class_init,
> .interfaces = (InterfaceInfo[]) {
> { TYPE_STREAM_SLAVE },
> @@ -1080,7 +1080,7 @@ static const TypeInfo xilinx_enet_data_stream_info = {
> static const TypeInfo xilinx_enet_control_stream_info = {
> .name = TYPE_XILINX_AXI_ENET_CONTROL_STREAM,
> .parent = TYPE_OBJECT,
> - .instance_size = sizeof(struct XilinxAXIEnetStreamSlave),
> + .instance_size = sizeof(XilinxAXIEnetStreamSlave),
> .class_init = xilinx_enet_control_stream_class_init,
> .interfaces = (InterfaceInfo[]) {
> { TYPE_STREAM_SLAVE },
> --
> 2.26.2
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 6/6] virtio-vga: Use typedef name for instance_size
2020-08-24 21:59 ` [PATCH 6/6] virtio-vga: " Eduardo Habkost
@ 2020-08-25 5:50 ` Gerd Hoffmann
0 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2020-08-25 5:50 UTC (permalink / raw)
To: Eduardo Habkost
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-devel, qemu-arm, Marc-André Lureau, Edgar E. Iglesias
On Mon, Aug 24, 2020 at 05:59:36PM -0400, Eduardo Habkost wrote:
> This makes the code consistent with the rest of QOM code in QEMU,
> and will make automated conversion to type declaration macros
> simpler.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
` (5 preceding siblings ...)
2020-08-24 21:59 ` [PATCH 6/6] virtio-vga: " Eduardo Habkost
@ 2020-09-04 18:21 ` Eduardo Habkost
6 siblings, 0 replies; 10+ messages in thread
From: Eduardo Habkost @ 2020-09-04 18:21 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
qemu-arm, Gerd Hoffmann, Marc-André Lureau,
Edgar E. Iglesias
On Mon, Aug 24, 2020 at 05:59:30PM -0400, Eduardo Habkost wrote:
> This changes existing QOM boilerplate to use existing typedef
> names when setting instance_size and class_size on TypeInfo
> variables. This makes the code more consistent and will make
> future conversion to QOM type declaration macros easier.
I'm queueing this series, as I consider the patches trivial
cleanups.
--
Eduardo
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-09-04 18:22 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
2020-08-24 21:59 ` [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size Eduardo Habkost
2020-08-24 21:59 ` [PATCH 2/6] omap_intc: " Eduardo Habkost
2020-08-24 21:59 ` [PATCH 3/6] lpc_ich9: " Eduardo Habkost
2020-08-24 21:59 ` [PATCH 4/6] xilinx_axienet: " Eduardo Habkost
2020-08-24 22:21 ` Alistair Francis
2020-08-24 21:59 ` [PATCH 5/6] vhost-user-vga: " Eduardo Habkost
2020-08-24 21:59 ` [PATCH 6/6] virtio-vga: " Eduardo Habkost
2020-08-25 5:50 ` Gerd Hoffmann
2020-09-04 18:21 ` [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.