All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size
@ 2020-08-24 21:57 Eduardo Habkost
  2020-08-24 21:57 ` [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size Eduardo Habkost
  0 siblings, 1 reply; 5+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
	qemu-arm, Gerd Hoffmann, Edgar E. Iglesias,
	Marc-André Lureau

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] 5+ messages in thread

* [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size
  2020-08-24 21:57 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
@ 2020-08-24 21:57 ` Eduardo Habkost
  2020-08-24 22:19   ` Alistair Francis
  0 siblings, 1 reply; 5+ messages in thread
From: Eduardo Habkost @ 2020-08-24 21:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Michael S. Tsirkin, Jason Wang, Alistair Francis,
	qemu-arm, Gerd Hoffmann, Edgar E. Iglesias,
	Marc-André Lureau

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] 5+ messages in thread

* Re: [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size
  2020-08-24 21:57 ` [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size Eduardo Habkost
@ 2020-08-24 22:19   ` Alistair Francis
  0 siblings, 0 replies; 5+ messages in thread
From: Alistair Francis @ 2020-08-24 22:19 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,
	Marc-André Lureau, Edgar E. Iglesias

On Mon, Aug 24, 2020 at 2:58 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: 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	[flat|nested] 5+ 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
@ 2020-09-04 18:21 ` Eduardo Habkost
  0 siblings, 0 replies; 5+ 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] 5+ messages in thread

* [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size
@ 2020-08-24 21:59 Eduardo Habkost
  2020-09-04 18:21 ` Eduardo Habkost
  0 siblings, 1 reply; 5+ 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] 5+ messages in thread

end of thread, other threads:[~2020-09-04 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24 21:57 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
2020-08-24 21:57 ` [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size Eduardo Habkost
2020-08-24 22:19   ` Alistair Francis
2020-08-24 21:59 [PATCH 0/6] qom: Use typedefs instead of struct names on instance_size/class_size Eduardo Habkost
2020-09-04 18:21 ` 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.