qom: Use typedefs instead of struct names on instance_size/class_size
cover qom: Use typedefs instead of struct names on instance_size/class_size
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.
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(-)
Signature · 1 line
2.26.2
PATCH 1/6 xilinx_axidma: Use typedef name for instance_size
This makes the code consistent with the rest of QOM code in QEMU, and will make automated conversion to type declaration macros simpler.
---
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- hw/dma/xilinx_axidma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/dma/xilinx_axidma.c +2 -2
@@ -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 []) {
Signature · 1 line
2.26.2
Re: [PATCH 1/6] xilinx_axidma: Use typedef name for instance_size
Quoted 6 lines · Eduardo Habkost
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 <[email protected]>
Alistair
Quoted 36 lines
---
Cc: "Edgar E. Iglesias" <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: [email protected]
Cc: [email protected]--- hw/dma/xilinx_axidma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/dma/xilinx_axidma.c +2
-3@@ -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