qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Fix definition of classes with wrong parent
@ 2025-06-05 10:23 Zhenzhong Duan
  2025-06-05 10:23 ` [PATCH v3 1/5] virtio-mem: Fix definition of VirtIOMEMClass Zhenzhong Duan
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Zhenzhong Duan @ 2025-06-05 10:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: chao.p.peng, david, Zhenzhong Duan

Hi,

This fix definition of some classes with wrong parent.
Used below script to get a list, hoping all are addressed.

find "$directory" -type d \( -name "roms" -o -name "build" \) -prune -o -type f \( -name "*.c" -o -name "*.h" \) -print | while read -r file; do
    awk '/^(struct |typedef struct )/ { 
        first = $0;
        getline second; 
        getline third; 
        if (first ~ /[Cc]lass/ && !(second ~ /Class/) && !(third ~ /Class/)) {
            print FILENAME ":" NR-2 ": " first; 
            print FILENAME ":" NR-1 ": " second; 
            print FILENAME ":" NR ": " third;
        }
    }' "$file"
done

patch4/5 are more like cleanups instead of fixes as those class_size are not
initialized so class definition doesn't take effect.

Thanks
Zhenzhong

Changelog:
v3:
- s/Suggested-by/Reported-by on patch2 (David)
- add Closes: tag (David)
- collect RB

v2:
- add more fixes per David


Zhenzhong Duan (5):
  virtio-mem: Fix definition of VirtIOMEMClass
  virtio-pmem: Fix definition of VirtIOPMEMClass
  hw/gpio/aspeed: Fix definition of AspeedGPIOClass
  hw/char/sh_serial: Remove dummy definition of SH_SERIAL class
  hw/riscv/riscv-iommu: Remove definition of RISCVIOMMU[Pci|Sys]Class

 include/hw/gpio/aspeed_gpio.h   | 2 +-
 include/hw/riscv/iommu.h        | 6 ++----
 include/hw/virtio/virtio-mem.h  | 2 +-
 include/hw/virtio/virtio-pmem.h | 2 +-
 hw/char/sh_serial.c             | 4 +---
 hw/riscv/riscv-iommu-pci.c      | 6 ------
 hw/riscv/riscv-iommu-sys.c      | 6 ------
 7 files changed, 6 insertions(+), 22 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-06  9:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-05 10:23 [PATCH v3 0/5] Fix definition of classes with wrong parent Zhenzhong Duan
2025-06-05 10:23 ` [PATCH v3 1/5] virtio-mem: Fix definition of VirtIOMEMClass Zhenzhong Duan
2025-06-05 10:57   ` Markus Armbruster
2025-06-06  9:10     ` Duan, Zhenzhong
2025-06-05 10:23 ` [PATCH v3 2/5] virtio-pmem: Fix definition of VirtIOPMEMClass Zhenzhong Duan
2025-06-05 10:23 ` [PATCH v3 3/5] hw/gpio/aspeed: Fix definition of AspeedGPIOClass Zhenzhong Duan
2025-06-05 10:23 ` [PATCH v3 4/5] hw/char/sh_serial: Remove dummy definition of SH_SERIAL class Zhenzhong Duan
2025-06-05 10:23 ` [PATCH v3 5/5] hw/riscv/riscv-iommu: Remove definition of RISCVIOMMU[Pci|Sys]Class Zhenzhong Duan
2025-06-05 13:24   ` Daniel Henrique Barboza

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).