QOM queue, 2020-09-18
Subsystems (15)
The following changes since commit 053a4177817db307ec854356e95b5b350800a216:
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/fw_cfg-20200918' into staging (2020-09-18 16:34:26 +0100)
are available in the Git repository at:
git://github.com/ehabkost/qemu.git tags/machine-next-pull-request
for you to fetch changes up to 8063396bf3459a810d24e3efd6110b8480f0de5b:
Use OBJECT_DECLARE_SIMPLE_TYPE when possible (2020-09-18 14:12:32 -0400)
----------------------------------------------------------------
QOM queue, 2020-09-18
Fixes:
* Error value corrections (Markus Armbruster)
* Correct object_class_dynamic_cast_assert() documentation (Eduardo Habkost)
* Ensure objects using QEMU_ALIGNED are properly aligned (Richard Henderson)
QOM cleanups (Eduardo Habkost):
* Rename some constants
* Simplify parameters of OBJECT_DECLARE* macros
* Additional DECLARE_*CHECKER* usage
* Additional OBJECT_DECLARE_TYPE usage
* Additional OBJECT_DECLARE_SIMPLE_TYPE usage
----------------------------------------------------------------
Eduardo Habkost (10):
sifive_e: Rename memmap enum constants
sifive_u: Rename memmap enum constants
sifive: Move QOM typedefs and add missing includes
sifive: Use DECLARE_*CHECKER* macros
qom: Correct object_class_dynamic_cast_assert() documentation scripts/codeconverter: Update to latest version
qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE
qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros Use OBJECT_DECLARE_TYPE when possible
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
Markus Armbruster (2):
qom: Clean up object_property_get_enum()'s error value
qom: Correct error values in two contracts
Richard Henderson (5):
qom: Allow objects to be allocated with increased alignment target/arm: Set instance_align on CPUARM TypeInfo target/ppc: Set instance_align on PowerPCCPU TypeInfo target/riscv: Set instance_align on RISCVCPU TypeInfo target/s390x: Set instance_align on S390CPU TypeInfo
hw/9pfs/virtio-9p.h | 4 +- hw/audio/intel-hda.h | 6 +- hw/display/ati_int.h | 4 +- hw/display/qxl.h | 4 +- hw/display/virtio-vga.h | 2 +- hw/i386/amd_iommu.h | 4 +- hw/intc/sifive_plic.h | 10 +- hw/misc/tmp105.h | 4 +- hw/net/fsl_etsec/etsec.h | 3 +- hw/net/tulip.h | 4 +- hw/ppc/e500-ccsr.h | 4 +- hw/ppc/e500.h | 5 +- hw/ppc/mac.h | 4 +- hw/s390x/ccw-device.h | 4 +- hw/s390x/ipl.h | 4 +- hw/s390x/s390-pci-bus.h | 16 +- hw/s390x/virtio-ccw.h | 57 +- hw/usb/ccid.h | 5 +- hw/usb/hcd-dwc2.h | 3 +- hw/usb/hcd-ehci.h | 13 +- hw/usb/hcd-ohci.h | 4 +- hw/usb/hcd-xhci.h | 4 +- hw/vfio/pci.h | 4 +- hw/virtio/virtio-pci.h | 5 +- hw/xen/xen_pt.h | 4 +- include/authz/base.h | 2 +- include/authz/list.h | 4 +- include/authz/listfile.h | 4 +- include/authz/pamacct.h | 4 +- include/authz/simple.h | 4 +- include/block/throttle-groups.h | 4 +- include/chardev/char.h | 4 +- include/crypto/secret_common.h | 2 +- include/crypto/secret_keyring.h | 4 +- include/hw/acpi/generic_event_device.h | 4 +- include/hw/acpi/vmgenid.h | 4 +- include/hw/adc/stm32f2xx_adc.h | 4 +- include/hw/arm/allwinner-a10.h | 4 +- include/hw/arm/allwinner-h3.h | 4 +- include/hw/arm/armsse.h | 2 +- include/hw/arm/armv7m.h | 8 +- include/hw/arm/aspeed_soc.h | 5 +- include/hw/arm/bcm2835_peripherals.h | 4 +- include/hw/arm/bcm2836.h | 5 +- include/hw/arm/digic.h | 4 +- include/hw/arm/exynos4210.h | 4 +- include/hw/arm/fsl-imx25.h | 4 +- include/hw/arm/fsl-imx31.h | 4 +- include/hw/arm/fsl-imx6.h | 4 +- include/hw/arm/fsl-imx6ul.h | 4 +- include/hw/arm/fsl-imx7.h | 4 +- include/hw/arm/msf2-soc.h | 4 +- include/hw/arm/nrf51_soc.h | 4 +- include/hw/arm/omap.h | 4 +- include/hw/arm/pxa.h | 15 +- include/hw/arm/smmu-common.h | 5 +- include/hw/arm/smmuv3.h | 5 +- include/hw/arm/stm32f205_soc.h | 4 +- include/hw/arm/stm32f405_soc.h | 4 +- include/hw/arm/virt.h | 5 +- include/hw/arm/xlnx-versal.h | 4 +- include/hw/arm/xlnx-zynqmp.h | 4 +- include/hw/block/flash.h | 8 +- include/hw/block/swim.h | 12 +- include/hw/boards.h | 3 +- include/hw/char/avr_usart.h | 4 +- include/hw/char/bcm2835_aux.h | 4 +- include/hw/char/cadence_uart.h | 4 +- include/hw/char/cmsdk-apb-uart.h | 4 +- include/hw/char/digic-uart.h | 4 +- include/hw/char/escc.h | 4 +- include/hw/char/ibex_uart.h | 4 +- include/hw/char/imx_serial.h | 4 +- include/hw/char/nrf51_uart.h | 4 +- include/hw/char/pl011.h | 4 +- include/hw/char/serial.h | 11 +- include/hw/char/sifive_uart.h | 10 +- include/hw/char/stm32f2xx_usart.h | 4 +- include/hw/clock.h | 4 +- include/hw/core/generic-loader.h | 4 +- include/hw/core/split-irq.h | 4 +- include/hw/cpu/a15mpcore.h | 4 +- include/hw/cpu/a9mpcore.h | 4 +- include/hw/cpu/arm11mpcore.h | 4 +- include/hw/cpu/cluster.h | 4 +- include/hw/cpu/core.h | 4 +- include/hw/display/bcm2835_fb.h | 4 +- include/hw/display/dpcd.h | 4 +- include/hw/display/i2c-ddc.h | 4 +- include/hw/display/macfb.h | 9 +- include/hw/display/xlnx_dp.h | 4 +- include/hw/dma/bcm2835_dma.h | 4 +- include/hw/dma/i8257.h | 4 +- include/hw/dma/pl080.h | 4 +- include/hw/dma/xlnx-zdma.h | 4 +- include/hw/dma/xlnx-zynq-devcfg.h | 4 +- include/hw/dma/xlnx_dpdma.h | 4 +- include/hw/gpio/aspeed_gpio.h | 5 +- include/hw/gpio/bcm2835_gpio.h | 4 +- include/hw/gpio/imx_gpio.h | 4 +- include/hw/gpio/nrf51_gpio.h | 4 +- include/hw/gpio/sifive_gpio.h | 9 +- include/hw/hyperv/vmbus-bridge.h | 4 +- include/hw/hyperv/vmbus.h | 6 +- include/hw/i2c/aspeed_i2c.h | 5 +- include/hw/i2c/i2c.h | 5 +- include/hw/i2c/imx_i2c.h | 4 +- include/hw/i2c/microbit_i2c.h | 4 +- include/hw/i2c/ppc4xx_i2c.h | 4 +- include/hw/i2c/smbus_slave.h | 2 +- include/hw/i386/ich9.h | 4 +- include/hw/i386/intel_iommu.h | 4 +- include/hw/i386/ioapic_internal.h | 5 +- include/hw/i386/microvm.h | 5 +- include/hw/i386/pc.h | 4 +- include/hw/i386/x86-iommu.h | 5 +- include/hw/i386/x86.h | 5 +- include/hw/ide/ahci.h | 12 +- include/hw/ide/internal.h | 8 +- include/hw/ide/pci.h | 4 +- include/hw/input/adb.h | 8 +- include/hw/input/i8042.h | 4 +- include/hw/intc/allwinner-a10-pic.h | 4 +- include/hw/intc/aspeed_vic.h | 4 +- include/hw/intc/bcm2835_ic.h | 4 +- include/hw/intc/bcm2836_control.h | 4 +- include/hw/intc/heathrow_pic.h | 4 +- include/hw/intc/ibex_plic.h | 4 +- include/hw/intc/imx_avic.h | 4 +- include/hw/intc/imx_gpcv2.h | 4 +- include/hw/intc/mips_gic.h | 4 +- include/hw/intc/realview_gic.h | 4 +- include/hw/intc/rx_icu.h | 4 +- include/hw/intc/xlnx-pmu-iomod-intc.h | 4 +- include/hw/intc/xlnx-zynqmp-ipi.h | 4 +- include/hw/ipack/ipack.h | 6 +- include/hw/ipmi/ipmi.h | 6 +- include/hw/isa/i8259_internal.h | 5 +- include/hw/isa/isa.h | 7 +- include/hw/isa/pc87312.h | 4 +- include/hw/m68k/mcf_fec.h | 4 +- include/hw/mem/nvdimm.h | 5 +- include/hw/mem/pc-dimm.h | 2 +- include/hw/mips/cps.h | 4 +- include/hw/misc/a9scu.h | 4 +- include/hw/misc/allwinner-cpucfg.h | 4 +- include/hw/misc/allwinner-h3-ccu.h | 4 +- include/hw/misc/allwinner-h3-dramc.h | 4 +- include/hw/misc/allwinner-h3-sysctrl.h | 4 +- include/hw/misc/allwinner-sid.h | 4 +- include/hw/misc/arm11scu.h | 4 +- include/hw/misc/armsse-cpuid.h | 4 +- include/hw/misc/armsse-mhu.h | 4 +- include/hw/misc/aspeed_scu.h | 5 +- include/hw/misc/aspeed_sdmc.h | 5 +- include/hw/misc/aspeed_xdma.h | 4 +- include/hw/misc/auxbus.h | 11 +- include/hw/misc/avr_power.h | 4 +- include/hw/misc/bcm2835_mbox.h | 4 +- include/hw/misc/bcm2835_mphi.h | 3 +- include/hw/misc/bcm2835_property.h | 4 +- include/hw/misc/bcm2835_rng.h | 4 +- include/hw/misc/bcm2835_thermal.h | 4 +- include/hw/misc/grlib_ahb_apb_pnp.h | 8 +- include/hw/misc/imx25_ccm.h | 4 +- include/hw/misc/imx31_ccm.h | 4 +- include/hw/misc/imx6_ccm.h | 4 +- include/hw/misc/imx6_src.h | 4 +- include/hw/misc/imx6ul_ccm.h | 4 +- include/hw/misc/imx7_ccm.h | 8 +- include/hw/misc/imx7_gpr.h | 4 +- include/hw/misc/imx7_snvs.h | 4 +- include/hw/misc/imx_ccm.h | 5 +- include/hw/misc/imx_rngc.h | 4 +- include/hw/misc/iotkit-secctl.h | 4 +- include/hw/misc/iotkit-sysctl.h | 4 +- include/hw/misc/iotkit-sysinfo.h | 4 +- include/hw/misc/mac_via.h | 12 +- include/hw/misc/macio/cuda.h | 8 +- include/hw/misc/macio/gpio.h | 4 +- include/hw/misc/macio/macio.h | 20 +- include/hw/misc/macio/pmu.h | 8 +- include/hw/misc/max111x.h | 4 +- include/hw/misc/mips_cmgcr.h | 4 +- include/hw/misc/mips_cpc.h | 4 +- include/hw/misc/mips_itu.h | 4 +- include/hw/misc/mos6522.h | 5 +- include/hw/misc/mps2-fpgaio.h | 4 +- include/hw/misc/mps2-scc.h | 4 +- include/hw/misc/msf2-sysreg.h | 4 +- include/hw/misc/nrf51_rng.h | 4 +- include/hw/misc/sifive_e_prci.h | 10 +- include/hw/misc/sifive_test.h | 10 +- include/hw/misc/sifive_u_otp.h | 10 +- include/hw/misc/sifive_u_prci.h | 10 +- include/hw/misc/stm32f2xx_syscfg.h | 4 +- include/hw/misc/stm32f4xx_exti.h | 4 +- include/hw/misc/stm32f4xx_syscfg.h | 4 +- include/hw/misc/tz-mpc.h | 4 +- include/hw/misc/tz-msc.h | 4 +- include/hw/misc/tz-ppc.h | 4 +- include/hw/misc/unimp.h | 4 +- include/hw/misc/zynq-xadc.h | 4 +- include/hw/net/allwinner-sun8i-emac.h | 4 +- include/hw/net/allwinner_emac.h | 4 +- include/hw/net/cadence_gem.h | 4 +- include/hw/net/ftgmac100.h | 8 +- include/hw/net/imx_fec.h | 4 +- include/hw/net/msf2-emac.h | 4 +- include/hw/nubus/mac-nubus-bridge.h | 4 +- include/hw/nubus/nubus.h | 8 +- include/hw/nvram/fw_cfg.h | 9 +- include/hw/nvram/nrf51_nvm.h | 4 +- include/hw/pci-bridge/simba.h | 4 +- include/hw/pci-host/designware.h | 8 +- include/hw/pci-host/gpex.h | 8 +- include/hw/pci-host/i440fx.h | 4 +- include/hw/pci-host/pnv_phb3.h | 7 +- include/hw/pci-host/pnv_phb4.h | 11 +- include/hw/pci-host/q35.h | 8 +- include/hw/pci-host/sabre.h | 8 +- include/hw/pci-host/spapr.h | 4 +- include/hw/pci-host/uninorth.h | 4 +- include/hw/pci-host/xilinx-pcie.h | 8 +- include/hw/pci/pci.h | 4 +- include/hw/pci/pci_bridge.h | 3 +- include/hw/pci/pci_host.h | 4 +- include/hw/pci/pcie_host.h | 3 +- include/hw/pci/pcie_port.h | 6 +- include/hw/pcmcia.h | 5 +- include/hw/platform-bus.h | 4 +- include/hw/ppc/mac_dbdma.h | 3 +- include/hw/ppc/openpic.h | 4 +- include/hw/ppc/pnv.h | 2 +- include/hw/ppc/pnv_core.h | 6 +- include/hw/ppc/pnv_homer.h | 2 +- include/hw/ppc/pnv_occ.h | 2 +- include/hw/ppc/pnv_pnor.h | 4 +- include/hw/ppc/pnv_psi.h | 10 +- include/hw/ppc/pnv_xive.h | 2 +- include/hw/ppc/spapr.h | 13 +- include/hw/ppc/spapr_cpu_core.h | 2 +- include/hw/ppc/spapr_tpm_proxy.h | 4 +- include/hw/ppc/spapr_vio.h | 6 +- include/hw/ppc/xics.h | 2 +- include/hw/ppc/xive.h | 14 +- include/hw/qdev-core.h | 4 +- include/hw/riscv/opentitan.h | 4 +- include/hw/riscv/riscv_hart.h | 4 +- include/hw/riscv/sifive_e.h | 38 +- include/hw/riscv/sifive_u.h | 34 +- include/hw/rtc/allwinner-rtc.h | 5 +- include/hw/rtc/aspeed_rtc.h | 4 +- include/hw/rtc/goldfish_rtc.h | 4 +- include/hw/rtc/mc146818rtc.h | 4 +- include/hw/rtc/pl031.h | 4 +- include/hw/rtc/xlnx-zynqmp-rtc.h | 4 +- include/hw/s390x/3270-ccw.h | 5 +- include/hw/s390x/css-bridge.h | 8 +- include/hw/s390x/event-facility.h | 2 +- include/hw/s390x/s390-virtio-ccw.h | 5 +- include/hw/s390x/s390_flic.h | 6 +- include/hw/s390x/sclp.h | 2 +- include/hw/s390x/storage-attributes.h | 5 +- include/hw/s390x/storage-keys.h | 5 +- include/hw/s390x/tod.h | 5 +- include/hw/s390x/vfio-ccw.h | 4 +- include/hw/scsi/esp.h | 4 +- include/hw/scsi/scsi.h | 7 +- include/hw/sd/allwinner-sdhost.h | 5 +- include/hw/sd/aspeed_sdhci.h | 4 +- include/hw/sd/bcm2835_sdhost.h | 4 +- include/hw/sd/sd.h | 7 +- include/hw/sparc/sparc32_dma.h | 16 +- include/hw/ssi/aspeed_smc.h | 5 +- include/hw/ssi/imx_spi.h | 4 +- include/hw/ssi/mss-spi.h | 4 +- include/hw/ssi/pl022.h | 4 +- include/hw/ssi/ssi.h | 2 +- include/hw/ssi/stm32f2xx_spi.h | 4 +- include/hw/ssi/xilinx_spips.h | 11 +- include/hw/sysbus.h | 2 +- include/hw/timer/a9gtimer.h | 4 +- include/hw/timer/allwinner-a10-pit.h | 4 +- include/hw/timer/arm_mptimer.h | 4 +- include/hw/timer/armv7m_systick.h | 4 +- include/hw/timer/aspeed_timer.h | 5 +- include/hw/timer/avr_timer16.h | 4 +- include/hw/timer/bcm2835_systmr.h | 4 +- include/hw/timer/cmsdk-apb-dualtimer.h | 4 +- include/hw/timer/cmsdk-apb-timer.h | 4 +- include/hw/timer/digic-timer.h | 4 +- include/hw/timer/i8254.h | 5 +- include/hw/timer/imx_epit.h | 4 +- include/hw/timer/mss-timer.h | 4 +- include/hw/timer/nrf51_timer.h | 4 +- include/hw/usb.h | 8 +- include/hw/usb/chipidea.h | 4 +- include/hw/usb/imx-usb-phy.h | 4 +- include/hw/virtio/vhost-scsi-common.h | 4 +- include/hw/virtio/vhost-scsi.h | 4 +- include/hw/virtio/vhost-user-blk.h | 4 +- include/hw/virtio/vhost-user-fs.h | 4 +- include/hw/virtio/vhost-user-scsi.h | 4 +- include/hw/virtio/vhost-user-vsock.h | 4 +- include/hw/virtio/vhost-vsock-common.h | 4 +- include/hw/virtio/vhost-vsock.h | 4 +- include/hw/virtio/virtio-balloon.h | 4 +- include/hw/virtio/virtio-blk.h | 4 +- include/hw/virtio/virtio-crypto.h | 4 +- include/hw/virtio/virtio-gpu-pci.h | 4 +- include/hw/virtio/virtio-gpu.h | 10 +- include/hw/virtio/virtio-input.h | 14 +- include/hw/virtio/virtio-iommu.h | 4 +- include/hw/virtio/virtio-mem.h | 2 +- include/hw/virtio/virtio-mmio.h | 4 +- include/hw/virtio/virtio-net.h | 4 +- include/hw/virtio/virtio-pmem.h | 2 +- include/hw/virtio/virtio-rng.h | 4 +- include/hw/virtio/virtio-scsi.h | 8 +- include/hw/virtio/virtio-serial.h | 9 +- include/hw/virtio/virtio.h | 4 +- include/hw/watchdog/cmsdk-apb-watchdog.h | 4 +- include/hw/watchdog/wdt_aspeed.h | 5 +- include/hw/watchdog/wdt_imx2.h | 4 +- include/hw/xen/xen-block.h | 12 +- include/hw/xen/xen-bus.h | 6 +- include/io/channel-buffer.h | 4 +- include/io/channel-command.h | 4 +- include/io/channel-file.h | 4 +- include/io/channel-socket.h | 4 +- include/io/channel-tls.h | 4 +- include/io/channel-websock.h | 4 +- include/io/channel.h | 2 +- include/io/dns-resolver.h | 4 +- include/io/net-listener.h | 4 +- include/net/can_emu.h | 3 +- include/net/can_host.h | 5 +- include/net/filter.h | 4 +- include/qom/object.h | 37 +- include/scsi/pr-manager.h | 2 +- include/sysemu/cryptodev.h | 2 +- include/sysemu/hostmem.h | 2 +- include/sysemu/rng-random.h | 4 +- include/sysemu/rng.h | 2 +- include/sysemu/tpm_backend.h | 2 +- include/sysemu/vhost-user-backend.h | 4 +- include/ui/console.h | 4 +- target/alpha/cpu-qom.h | 2 +- target/arm/cpu-qom.h | 2 +- target/avr/cpu-qom.h | 2 +- target/cris/cpu-qom.h | 2 +- target/hppa/cpu-qom.h | 2 +- target/i386/cpu-qom.h | 2 +- target/lm32/cpu-qom.h | 2 +- target/m68k/cpu-qom.h | 2 +- target/microblaze/cpu-qom.h | 2 +- target/mips/cpu-qom.h | 2 +- target/moxie/cpu.h | 2 +- target/nios2/cpu.h | 2 +- target/openrisc/cpu.h | 2 +- target/ppc/cpu-qom.h | 2 +- target/riscv/cpu.h | 2 +- target/rx/cpu-qom.h | 2 +- target/s390x/cpu-qom.h | 2 +- target/sh4/cpu-qom.h | 2 +- target/sparc/cpu-qom.h | 2 +- target/tilegx/cpu.h | 2 +- target/tricore/cpu-qom.h | 2 +- target/unicore32/cpu-qom.h | 2 +- target/xtensa/cpu-qom.h | 2 +- authz/list.c | 1 - authz/listfile.c | 1 - authz/pamacct.c | 1 - authz/simple.c | 1 - backends/cryptodev-builtin.c | 5 +- backends/cryptodev-vhost-user.c | 4 +- backends/dbus-vmstate.c | 5 +- backends/hostmem-file.c | 4 +- backends/hostmem-memfd.c | 4 +- backends/rng-builtin.c | 4 +- backends/rng-egd.c | 4 +- backends/tpm/tpm_emulator.c | 4 +- backends/tpm/tpm_passthrough.c | 4 +- backends/vhost-user.c | 1 - crypto/secret_keyring.c | 1 - hw/acpi/piix4.c | 4 +- hw/alpha/typhoon.c | 4 +- hw/arm/collie.c | 4 +- hw/arm/highbank.c | 4 +- hw/arm/integratorcp.c | 12 +- hw/arm/microbit.c | 4 +- hw/arm/mps2-tz.c | 5 +- hw/arm/mps2.c | 5 +- hw/arm/musca.c | 5 +- hw/arm/musicpal.c | 32 +- hw/arm/palm.c | 4 +- hw/arm/pxa2xx.c | 12 +- hw/arm/pxa2xx_gpio.c | 4 +- hw/arm/pxa2xx_pic.c | 4 +- hw/arm/sbsa-ref.c | 4 +- hw/arm/spitz.c | 25 +- hw/arm/stellaris.c | 8 +- hw/arm/strongarm.c | 24 +- hw/arm/tosa.c | 8 +- hw/arm/versatilepb.c | 4 +- hw/arm/vexpress.c | 5 +- hw/arm/xilinx_zynq.c | 4 +- hw/arm/xlnx-versal-virt.c | 4 +- hw/arm/xlnx-zcu102.c | 4 +- hw/arm/z2.c | 8 +- hw/audio/ac97.c | 4 +- hw/audio/adlib.c | 4 +- hw/audio/es1370.c | 3 +- hw/audio/gus.c | 4 +- hw/audio/hda-codec.c | 3 +- hw/audio/marvell_88w8618.c | 4 +- hw/audio/milkymist-ac97.c | 4 +- hw/audio/pcspk.c | 4 +- hw/audio/pl041.c | 4 +- hw/audio/sb16.c | 4 +- hw/audio/wm8750.c | 4 +- hw/block/fdc.c | 16 +- hw/block/m25p80.c | 5 +- hw/block/nand.c | 3 +- hw/block/onenand.c | 4 +- hw/char/debugcon.c | 4 +- hw/char/exynos4210_uart.c | 4 +- hw/char/grlib_apbuart.c | 4 +- hw/char/ipoctal232.c | 3 +- hw/char/lm32_juart.c | 4 +- hw/char/lm32_uart.c | 4 +- hw/char/mcf_uart.c | 4 +- hw/char/milkymist-uart.c | 4 +- hw/char/parallel.c | 4 +- hw/char/serial-isa.c | 4 +- hw/char/serial-pci.c | 4 +- hw/char/spapr_vty.c | 4 +- hw/char/xilinx_uartlite.c | 4 +- hw/cpu/realview_mpcore.c | 4 +- hw/display/ads7846.c | 4 +- hw/display/artist.c | 4 +- hw/display/bochs-display.c | 4 +- hw/display/cg3.c | 4 +- hw/display/cirrus_vga.c | 4 +- hw/display/cirrus_vga_isa.c | 4 +- hw/display/exynos4210_fimd.c | 4 +- hw/display/g364fb.c | 4 +- hw/display/jazz_led.c | 4 +- hw/display/milkymist-tmu2.c | 4 +- hw/display/milkymist-vgafb.c | 4 +- hw/display/next-fb.c | 4 +- hw/display/pl110.c | 4 +- hw/display/sii9022.c | 4 +- hw/display/sm501.c | 8 +- hw/display/ssd0303.c | 4 +- hw/display/ssd0323.c | 4 +- hw/display/tcx.c | 4 +- hw/display/vga-isa.c | 4 +- hw/display/vga-pci.c | 4 +- hw/dma/i82374.c | 4 +- hw/dma/pl330.c | 3 +- hw/dma/puv3_dma.c | 4 +- hw/dma/pxa2xx_dma.c | 4 +- hw/dma/rc4030.c | 4 +- hw/dma/xilinx_axidma.c | 4 +- hw/gpio/gpio_key.c | 4 +- hw/gpio/max7310.c | 4 +- hw/gpio/mpc8xxx.c | 4 +- hw/gpio/pl061.c | 4 +- hw/gpio/puv3_gpio.c | 4 +- hw/gpio/zaurus.c | 4 +- hw/hppa/dino.c | 4 +- hw/hppa/lasi.c | 4 +- hw/hyperv/hyperv.c | 4 +- hw/hyperv/hyperv_testdev.c | 4 +- hw/i2c/bitbang_i2c.c | 4 +- hw/i2c/exynos4210_i2c.c | 4 +- hw/i2c/mpc_i2c.c | 4 +- hw/i2c/smbus_eeprom.c | 4 +- hw/i2c/smbus_ich9.c | 4 +- hw/i386/kvm/clock.c | 4 +- hw/i386/kvmvapic.c | 4 +- hw/i386/port92.c | 4 +- hw/i386/vmmouse.c | 4 +- hw/i386/vmport.c | 4 +- hw/i386/xen/xen_platform.c | 4 +- hw/i386/xen/xen_pvdevice.c | 4 +- hw/ide/isa.c | 4 +- hw/ide/microdrive.c | 4 +- hw/ide/sii3112.c | 4 +- hw/input/adb-kbd.c | 5 +- hw/input/adb-mouse.c | 5 +- hw/input/lm832x.c | 4 +- hw/input/milkymist-softusb.c | 4 +- hw/input/pl050.c | 4 +- hw/intc/arm_gicv2m.c | 4 +- hw/intc/exynos4210_combiner.c | 4 +- hw/intc/exynos4210_gic.c | 8 +- hw/intc/grlib_irqmp.c | 4 +- hw/intc/lm32_pic.c | 4 +- hw/intc/nios2_iic.c | 4 +- hw/intc/ompic.c | 4 +- hw/intc/openpic_kvm.c | 4 +- hw/intc/pl190.c | 4 +- hw/intc/puv3_intc.c | 4 +- hw/intc/slavio_intctl.c | 4 +- hw/ipack/tpci200.c | 4 +- hw/ipmi/ipmi_bmc_extern.c | 4 +- hw/ipmi/isa_ipmi_bt.c | 4 +- hw/ipmi/isa_ipmi_kcs.c | 4 +- hw/ipmi/pci_ipmi_bt.c | 4 +- hw/ipmi/pci_ipmi_kcs.c | 4 +- hw/ipmi/smbus_ipmi.c | 4 +- hw/isa/i82378.c | 4 +- hw/isa/piix4.c | 4 +- hw/isa/vt82c686.c | 16 +- hw/m68k/mcf_intc.c | 4 +- hw/m68k/next-cube.c | 4 +- hw/m68k/next-kbd.c | 4 +- hw/microblaze/xlnx-zynqmp-pmu.c | 4 +- hw/mips/gt64xxx_pci.c | 4 +- hw/mips/malta.c | 4 +- hw/misc/applesmc.c | 4 +- hw/misc/arm_integrator_debug.c | 4 +- hw/misc/arm_l2x0.c | 4 +- hw/misc/arm_sysctl.c | 4 +- hw/misc/debugexit.c | 4 +- hw/misc/eccmemctl.c | 4 +- hw/misc/empty_slot.c | 4 +- hw/misc/exynos4210_clk.c | 4 +- hw/misc/exynos4210_pmu.c | 4 +- hw/misc/exynos4210_rng.c | 4 +- hw/misc/milkymist-hpdmc.c | 4 +- hw/misc/milkymist-pfpu.c | 4 +- hw/misc/mst_fpga.c | 4 +- hw/misc/pc-testdev.c | 4 +- hw/misc/pci-testdev.c | 4 +- hw/misc/puv3_pm.c | 4 +- hw/misc/sga.c | 4 +- hw/misc/slavio_misc.c | 4 +- hw/misc/tmp421.c | 5 +- hw/misc/zynq_slcr.c | 4 +- hw/net/dp8393x.c | 4 +- hw/net/e1000e.c | 4 +- hw/net/etraxfs_eth.c | 4 +- hw/net/lan9118.c | 4 +- hw/net/milkymist-minimac2.c | 4 +- hw/net/mipsnet.c | 4 +- hw/net/ne2000-isa.c | 4 +- hw/net/opencores_eth.c | 4 +- hw/net/pcnet-pci.c | 4 +- hw/net/rtl8139.c | 4 +- hw/net/smc91c111.c | 4 +- hw/net/spapr_llan.c | 4 +- hw/net/stellaris_enet.c | 4 +- hw/net/sungem.c | 4 +- hw/net/sunhme.c | 4 +- hw/net/xgmac.c | 4 +- hw/net/xilinx_axienet.c | 4 +- hw/nvram/ds1225y.c | 4 +- hw/nvram/spapr_nvram.c | 4 +- hw/pci-bridge/dec.c | 4 +- hw/pci-bridge/gen_pcie_root_port.c | 4 +- hw/pci-bridge/pci_bridge_dev.c | 4 +- hw/pci-bridge/pcie_pci_bridge.c | 4 +- hw/pci-host/bonito.c | 6 +- hw/pci-host/grackle.c | 4 +- hw/pci-host/i440fx.c | 4 +- hw/pci-host/ppce500.c | 8 +- hw/pci-host/prep.c | 4 +- hw/ppc/mpc8544_guts.c | 4 +- hw/ppc/ppc440_pcix.c | 4 +- hw/ppc/ppc440_uc.c | 4 +- hw/ppc/ppc4xx_pci.c | 4 +- hw/ppc/ppce500_spin.c | 4 +- hw/ppc/prep_systemio.c | 4 +- hw/ppc/rs6000_mc.c | 4 +- hw/ppc/spapr_rng.c | 4 +- hw/riscv/sifive_e.c | 82 +- hw/riscv/sifive_u.c | 156 ++-- hw/rtc/ds1338.c | 4 +- hw/rtc/exynos4210_rtc.c | 4 +- hw/rtc/m41t80.c | 4 +- hw/rtc/sun4v-rtc.c | 4 +- hw/rtc/twl92230.c | 4 +- hw/scsi/lsi53c895a.c | 4 +- hw/scsi/scsi-disk.c | 5 +- hw/scsi/spapr_vscsi.c | 4 +- hw/scsi/vmw_pvscsi.c | 5 +- hw/sd/milkymist-memcard.c | 4 +- hw/sd/pl181.c | 4 +- hw/sd/ssi-sd.c | 4 +- hw/sh4/sh_pci.c | 4 +- hw/sparc/sun4m.c | 8 +- hw/sparc64/sun4u.c | 8 +- hw/ssi/ssi.c | 3 +- hw/ssi/xilinx_spi.c | 4 +- hw/timer/altera_timer.c | 4 +- hw/timer/arm_timer.c | 8 +- hw/timer/cadence_ttc.c | 4 +- hw/timer/exynos4210_mct.c | 4 +- hw/timer/exynos4210_pwm.c | 4 +- hw/timer/grlib_gptimer.c | 4 +- hw/timer/hpet.c | 4 +- hw/timer/lm32_timer.c | 4 +- hw/timer/milkymist-sysctl.c | 4 +- hw/timer/puv3_ost.c | 4 +- hw/timer/pxa2xx_timer.c | 4 +- hw/timer/slavio_timer.c | 4 +- hw/tpm/tpm_tis_isa.c | 4 +- hw/tpm/tpm_tis_sysbus.c | 4 +- hw/usb/dev-audio.c | 4 +- hw/usb/dev-hid.c | 4 +- hw/usb/dev-hub.c | 4 +- hw/usb/dev-mtp.c | 3 +- hw/usb/dev-network.c | 4 +- hw/usb/dev-serial.c | 4 +- hw/usb/dev-smartcard-reader.c | 7 +- hw/usb/dev-uas.c | 3 +- hw/usb/dev-wacom.c | 4 +- hw/usb/hcd-ohci-pci.c | 4 +- hw/usb/host-libusb.c | 4 +- hw/usb/tusb6010.c | 4 +- hw/vfio/ap.c | 4 +- hw/virtio/virtio-input-pci.c | 8 +- hw/watchdog/wdt_i6300esb.c | 4 +- io/dns-resolver.c | 1 - io/net-listener.c | 1 - migration/rdma.c | 4 +- net/can/can_socketcan.c | 4 +- net/dump.c | 4 +- net/filter-buffer.c | 4 +- net/filter-replay.c | 4 +- net/filter-rewriter.c | 4 +- qom/object.c | 42 +- scsi/pr-manager-helper.c | 4 +- target/arm/cpu.c | 2 + target/i386/sev.c | 4 +- target/riscv/cpu.c | 1 + target/s390x/cpu.c | 1 + tests/check-qom-proplist.c | 2 + ui/input-barrier.c | 5 +- ui/input-linux.c | 5 +- .../codeconverter/codeconverter/patching.py | 193 +++-- .../codeconverter/codeconverter/qom_macros.py | 327 ++++++-- .../codeconverter/qom_type_info.py | 741 +++++++++++++++--- .../codeconverter/test_patching.py | 3 +- .../codeconverter/test_regexps.py | 26 +- scripts/codeconverter/converter.py | 12 +- target/ppc/translate_init.c.inc | 1 + 651 files changed, 2079 insertions(+), 2595 deletions(-)
Signature · 1 line
2.26.2
[PULL 04/17] sifive: Use DECLARE_*CHECKER* macros
$ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]')
Message-Id: <[email protected]>
--- hw/intc/sifive_plic.h | 4 ++-- include/hw/char/sifive_uart.h | 4 ++-- include/hw/gpio/sifive_gpio.h | 3 ++- include/hw/misc/sifive_e_prci.h | 4 ++-- include/hw/misc/sifive_test.h | 4 ++-- include/hw/misc/sifive_u_otp.h | 4 ++-- include/hw/misc/sifive_u_prci.h | 4 ++-- 7 files changed, 14 insertions(+), 13 deletions(-)
hw/intc/sifive_plic.h +2 -2
@@ -27,8 +27,8 @@#define TYPE_SIFIVE_PLIC "riscv.sifive.plic"typedef struct SiFivePLICState SiFivePLICState ; -#define SIFIVE_PLIC (obj) \ - OBJECT_CHECK(SiFivePLICState, (obj), TYPE_SIFIVE_PLIC) +DECLARE_INSTANCE_CHECKER (SiFivePLICState,SIFIVE_PLIC , + TYPE_SIFIVE_PLIC) typedef enum PLICMode { PLICMode_U,
include/hw/char/sifive_uart.h +2 -2
@@ -53,8 +53,8 @@ enum {#define TYPE_SIFIVE_UART "riscv.sifive.uart"typedef struct SiFiveUARTState SiFiveUARTState ; -#define SIFIVE_UART (obj) \ - OBJECT_CHECK(SiFiveUARTState, (obj), TYPE_SIFIVE_UART) +DECLARE_INSTANCE_CHECKER (SiFiveUARTState,SIFIVE_UART , + TYPE_SIFIVE_UART)struct SiFiveUARTState {/*< private >*/
include/hw/gpio/sifive_gpio.h +2 -1
@@ -19,7 +19,8 @@#define TYPE_SIFIVE_GPIO "sifive_soc.gpio"typedef struct SIFIVEGPIOState SIFIVEGPIOState ; -#define SIFIVE_GPIO (obj) OBJECT_CHECK(SIFIVEGPIOState, (obj), TYPE_SIFIVE_GPIO) +DECLARE_INSTANCE_CHECKER (SIFIVEGPIOState,SIFIVE_GPIO , + TYPE_SIFIVE_GPIO)#define SIFIVE_GPIO_PINS 32
include/hw/misc/sifive_e_prci.h +2 -2
@@ -53,8 +53,8 @@ enum {#define TYPE_SIFIVE_E_PRCI "riscv.sifive.e.prci"typedef struct SiFiveEPRCIState SiFiveEPRCIState ; -#define SIFIVE_E_PRCI (obj) \ - OBJECT_CHECK(SiFiveEPRCIState, (obj), TYPE_SIFIVE_E_PRCI) +DECLARE_INSTANCE_CHECKER (SiFiveEPRCIState,SIFIVE_E_PRCI , + TYPE_SIFIVE_E_PRCI)struct SiFiveEPRCIState {/*< private >*/
include/hw/misc/sifive_test.h +2 -2
@@ -25,8 +25,8 @@#define TYPE_SIFIVE_TEST "riscv.sifive.test"typedef struct SiFiveTestState SiFiveTestState ; -#define SIFIVE_TEST (obj) \ - OBJECT_CHECK(SiFiveTestState, (obj), TYPE_SIFIVE_TEST) +DECLARE_INSTANCE_CHECKER (SiFiveTestState,SIFIVE_TEST , + TYPE_SIFIVE_TEST)struct SiFiveTestState {/*< private >*/
include/hw/misc/sifive_u_otp.h +2 -2
@@ -51,8 +51,8 @@#define TYPE_SIFIVE_U_OTP "riscv.sifive.u.otp"typedef struct SiFiveUOTPState SiFiveUOTPState ; -#define SIFIVE_U_OTP (obj) \ - OBJECT_CHECK(SiFiveUOTPState, (obj), TYPE_SIFIVE_U_OTP) +DECLARE_INSTANCE_CHECKER (SiFiveUOTPState,SIFIVE_U_OTP , + TYPE_SIFIVE_U_OTP)struct SiFiveUOTPState {/*< private >*/
include/hw/misc/sifive_u_prci.h +2 -2
@@ -60,8 +60,8 @@#define TYPE_SIFIVE_U_PRCI "riscv.sifive.u.prci"typedef struct SiFiveUPRCIState SiFiveUPRCIState ; -#define SIFIVE_U_PRCI (obj) \ - OBJECT_CHECK(SiFiveUPRCIState, (obj), TYPE_SIFIVE_U_PRCI) +DECLARE_INSTANCE_CHECKER (SiFiveUPRCIState,SIFIVE_U_PRCI , + TYPE_SIFIVE_U_PRCI)struct SiFiveUPRCIState {/*< private >*/
Signature · 1 line
2.26.2
[PULL 07/17] qom: Correct error values in two contracts
In reply to Eduardo HabkostFrom: Markus Armbruster <[email protected]>
object_property_get_bool()'s contract claims it returns NULL on error. Pasto; it returns false.
object_property_get_int()'s contract claims it returns "negative". It actually returns -1. All the other object_property_get_FOO() contracts specify the exact error value, so do the same here.
Message-Id: <[email protected]>
--- include/qom/object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/qom/object.h +2 -2
@@ -1624,7 +1624,7 @@ bool object_property_set_bool(Object *obj, const char *name,* @name: the name of the property * @errp: returns an error if this function fails * -* Returns: the value of the property, converted to a boolean, or NULL if +* Returns: the value of the property, converted to a boolean, or false if * an error occurs (including when the property value is not a bool). */ bool object_property_get_bool(Object *obj, const char *name,
@@ -1649,7 +1649,7 @@ bool object_property_set_int(Object *obj, const char *name,* @name: the name of the property * @errp: returns an error if this function fails * -* Returns: the value of the property, converted to an integer, or negative if +* Returns: the value of the property, converted to an integer, or -1 if * an error occurs (including when the property value is not an integer). */ int64_t object_property_get_int(Object *obj, const char *name,
Signature · 1 line
2.26.2
[PULL 03/17] sifive: Move QOM typedefs and add missing includes
In reply to Eduardo HabkostSome typedefs and macros are defined after the type check macros. This makes it difficult to automatically replace their definitions with OBJECT_DECLARE_TYPE.
Patch generated using:
$ ./scripts/codeconverter/converter.py -i \ --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]')
which will split "typdef struct { ... } TypedefName" declarations.
Followed by:
$ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \
$(git grep -l '' -- '*.[ch]')which will:
- move the typedefs and #defines above the type check macros
- add missing #include "qom/object.h" lines if necessary
Message-Id: <[email protected]>
--- hw/intc/sifive_plic.h | 6 ++++-- include/hw/char/sifive_uart.h | 6 ++++-- include/hw/gpio/sifive_gpio.h | 6 ++++-- include/hw/misc/sifive_e_prci.h | 6 ++++-- include/hw/misc/sifive_test.h | 6 ++++-- include/hw/misc/sifive_u_otp.h | 6 ++++-- include/hw/misc/sifive_u_prci.h | 6 ++++-- 7 files changed, 28 insertions(+), 14 deletions(-)
hw/intc/sifive_plic.h +4 -2
@@ -22,9 +22,11 @@#define HW_SIFIVE_PLIC_H #include "hw/sysbus.h" +#include "qom/object.h" #define TYPE_SIFIVE_PLIC "riscv.sifive.plic" +typedef struct SiFivePLICState SiFivePLICState ;#define SIFIVE_PLIC (obj) \ OBJECT_CHECK(SiFivePLICState, (obj), TYPE_SIFIVE_PLIC)
@@ -41,7 +43,7 @@ typedef struct PLICAddr {PLICMode mode; } PLICAddr; -typedef struct SiFivePLICState { +struct SiFivePLICState {/*< private >*/ SysBusDevice parent_obj;
@@ -69,7 +71,7 @@ typedef struct SiFivePLICState {uint32_t context_base;uint32_t context_stride;uint32_t aperture_size; -} SiFivePLICState; +}; DeviceState *sifive_plic_create(hwaddr addr, char *hart_config, uint32_t hartid_base, uint32_t num_sources,
include/hw/char/sifive_uart.h +4 -2
@@ -22,6 +22,7 @@#include "chardev/char-fe.h" #include "hw/sysbus.h" +#include "qom/object.h" enum {SIFIVE_UART_TXFIFO =0 ,
@@ -51,10 +52,11 @@ enum {#define TYPE_SIFIVE_UART "riscv.sifive.uart" +typedef struct SiFiveUARTState SiFiveUARTState ;#define SIFIVE_UART (obj) \ OBJECT_CHECK(SiFiveUARTState, (obj), TYPE_SIFIVE_UART) -typedef struct SiFiveUARTState { +struct SiFiveUARTState {/*< private >*/ SysBusDevice parent_obj;
@@ -69,7 +71,7 @@ typedef struct SiFiveUARTState {uint32_t txctrl;uint32_t rxctrl;uint32_t div; -} SiFiveUARTState; +};SiFiveUARTState *sifive_uart_create (MemoryRegion *address_space,hwaddr base,Chardev *chr,qemu_irq irq);
include/hw/gpio/sifive_gpio.h +4 -2
@@ -15,8 +15,10 @@#define SIFIVE_GPIO_H #include "hw/sysbus.h" +#include "qom/object.h" #define TYPE_SIFIVE_GPIO "sifive_soc.gpio" +typedef struct SIFIVEGPIOState SIFIVEGPIOState ;#define SIFIVE_GPIO (obj) OBJECT_CHECK(SIFIVEGPIOState, (obj), TYPE_SIFIVE_GPIO)#define SIFIVE_GPIO_PINS 32
@@ -41,7 +43,7 @@#define SIFIVE_GPIO_REG_IOF_SEL 0x03C#define SIFIVE_GPIO_REG_OUT_XOR 0x040 -typedef struct SIFIVEGPIOState { +struct SIFIVEGPIOState {SysBusDevice parent_obj;MemoryRegion mmio;
@@ -71,6 +73,6 @@ typedef struct SIFIVEGPIOState {/* config */ uint32_t ngpio; -} SIFIVEGPIOState; +};#endif /* SIFIVE_GPIO_H */
include/hw/misc/sifive_e_prci.h +4 -2
@@ -18,6 +18,7 @@#ifndef HW_SIFIVE_E_PRCI_H #define HW_SIFIVE_E_PRCI_H +#include "qom/object.h" enum { SIFIVE_E_PRCI_HFROSCCFG = 0x0,
@@ -51,10 +52,11 @@ enum {#define TYPE_SIFIVE_E_PRCI "riscv.sifive.e.prci" +typedef struct SiFiveEPRCIState SiFiveEPRCIState ;#define SIFIVE_E_PRCI (obj) \ OBJECT_CHECK(SiFiveEPRCIState, (obj), TYPE_SIFIVE_E_PRCI) -typedef struct SiFiveEPRCIState { +struct SiFiveEPRCIState {/*< private >*/ SysBusDevice parent_obj;
@@ -64,7 +66,7 @@ typedef struct SiFiveEPRCIState {uint32_t hfxosccfg;uint32_t pllcfg;uint32_t plloutdiv; -} SiFiveEPRCIState; +};DeviceState *sifive_e_prci_create (hwaddr addr);
include/hw/misc/sifive_test.h +4 -2
@@ -20,19 +20,21 @@#define HW_SIFIVE_TEST_H #include "hw/sysbus.h" +#include "qom/object.h" #define TYPE_SIFIVE_TEST "riscv.sifive.test" +typedef struct SiFiveTestState SiFiveTestState ;#define SIFIVE_TEST (obj) \ OBJECT_CHECK(SiFiveTestState, (obj), TYPE_SIFIVE_TEST) -typedef struct SiFiveTestState { +struct SiFiveTestState {/*< private >*/ SysBusDevice parent_obj;/*< public >*/ MemoryRegion mmio; -}SiFiveTestState ; +};enum {FINISHER_FAIL =0x3333 ,
include/hw/misc/sifive_u_otp.h +4 -2
@@ -18,6 +18,7 @@#ifndef HW_SIFIVE_U_OTP_H #define HW_SIFIVE_U_OTP_H +#include "qom/object.h" #define SIFIVE_U_OTP_PA 0x00#define SIFIVE_U_OTP_PAIO 0x04
@@ -49,10 +50,11 @@#define TYPE_SIFIVE_U_OTP "riscv.sifive.u.otp" +typedef struct SiFiveUOTPState SiFiveUOTPState ;#define SIFIVE_U_OTP (obj) \ OBJECT_CHECK(SiFiveUOTPState, (obj), TYPE_SIFIVE_U_OTP) -typedef struct SiFiveUOTPState { +struct SiFiveUOTPState {/*< private >*/ SysBusDevice parent_obj;
@@ -75,6 +77,6 @@ typedef struct SiFiveUOTPState {uint32_t fuse[SIFIVE_U_OTP_NUM_FUSES ];/* config */ uint32_t serial; -} SiFiveUOTPState; +};#endif /* HW_SIFIVE_U_OTP_H */
include/hw/misc/sifive_u_prci.h +4 -2
@@ -18,6 +18,7 @@#ifndef HW_SIFIVE_U_PRCI_H #define HW_SIFIVE_U_PRCI_H +#include "qom/object.h" #define SIFIVE_U_PRCI_HFXOSCCFG 0x00#define SIFIVE_U_PRCI_COREPLLCFG0 0x04
@@ -58,10 +59,11 @@#define TYPE_SIFIVE_U_PRCI "riscv.sifive.u.prci" +typedef struct SiFiveUPRCIState SiFiveUPRCIState ;#define SIFIVE_U_PRCI (obj) \ OBJECT_CHECK(SiFiveUPRCIState, (obj), TYPE_SIFIVE_U_PRCI) -typedef struct SiFiveUPRCIState { +struct SiFiveUPRCIState {/*< private >*/ SysBusDevice parent_obj;
@@ -76,7 +78,7 @@ typedef struct SiFiveUPRCIState {uint32_t coreclksel;uint32_t devicesreset;uint32_t clkmuxstatus; -} SiFiveUPRCIState; +};/* * Clock indexes for use by Device Tree data and the PRCI driver.
Signature · 1 line
2.26.2
[PULL 12/17] target/s390x: Set instance_align on S390CPU TypeInfo
In reply to Eduardo HabkostFrom: Richard Henderson <[email protected]>
Fix alignment of CPUS390XState.vregs.
Message-Id: <[email protected]>
--- target/s390x/cpu.c | 1 + 1 file changed, 1 insertion(+)
target/s390x/cpu.c +1 -0
@@ -517,6 +517,7 @@ static const TypeInfo s390_cpu_type_info = { .name = TYPE_S390_CPU, .parent = TYPE_CPU, .instance_size = sizeof(S390CPU), + .instance_align = __alignof__(S390CPU), .instance_init = s390_cpu_initfn, .instance_finalize = s390_cpu_finalize, .abstract = true,
Signature · 1 line
2.26.2
[PULL 05/17] qom: Correct object_class_dynamic_cast_assert() documentation
In reply to Eduardo Habkostobject_class_dynamic_cast_assert() is not used by INTERFACE_CHECK, remove misleading mention of that function in the documentation.
Message-Id: <[email protected]>
--- include/qom/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/qom/object.h +1 -1
@@ -1257,7 +1257,7 @@ type_init(do_qemu_init_ ## type_array)* of this function. The only difference in behavior is that this function * asserts instead of returning #NULL on failure if QOM cast debugging is * enabled. This function is not meant to be called directly, but only through -* the wrapper macros OBJECT_CLASS_CHECK and INTERFACE_CHECK. +* the wrapper macro OBJECT_CLASS_CHECK. */ ObjectClass *object_class_dynamic_cast_assert(ObjectClass *klass, const char *typename,
Signature · 1 line
2.26.2
[PULL 09/17] target/arm: Set instance_align on CPUARM TypeInfo
In reply to Eduardo HabkostFrom: Richard Henderson <[email protected]>
Fix alignment of CPUARMState.vfp.zregs.
Message-Id: <[email protected]>
--- target/arm/cpu.c | 2 ++ 1 file changed, 2 insertions(+)
target/arm/cpu.c +2 -0
@@ -2290,6 +2290,7 @@ void arm_cpu_register(const ARMCPUInfo *info)TypeInfo type_info = { .parent =TYPE_ARM_CPU , .instance_size =sizeof (ARMCPU ), + .instance_align = __alignof__(ARMCPU ), .instance_init = arm_cpu_instance_init, .class_size =sizeof (ARMCPUClass), .class_init = info->class_init ?: cpu_register_class_init,
@@ -2305,6 +2306,7 @@ static const TypeInfo arm_cpu_type_info = { .name = TYPE_ARM_CPU, .parent = TYPE_CPU, .instance_size = sizeof(ARMCPU), + .instance_align = __alignof__(ARMCPU), .instance_init = arm_cpu_initfn, .instance_finalize = arm_cpu_finalizefn, .abstract = true,
Signature · 1 line
2.26.2
[PULL 10/17] target/ppc: Set instance_align on PowerPCCPU TypeInfo
In reply to Eduardo HabkostFrom: Richard Henderson <[email protected]>
Fix alignment of CPUPPCState.vsr.
Message-Id: <[email protected]>
--- target/ppc/translate_init.c.inc | 1 + 1 file changed, 1 insertion(+)
target/ppc/translate_init.c.inc +1 -0
@@ -10960,6 +10960,7 @@ static const TypeInfo ppc_cpu_type_info = { .name = TYPE_POWERPC_CPU, .parent = TYPE_CPU, .instance_size = sizeof(PowerPCCPU), + .instance_align = __alignof__(PowerPCCPU), .instance_init = ppc_cpu_instance_init, .instance_finalize = ppc_cpu_instance_finalize, .abstract = true,
Signature · 1 line
2.26.2
[PULL 14/17] qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE
In reply to Eduardo HabkostThe requirement to specify the parent class type makes the macro harder to use and easy to misuse (silent bugs can be introduced if the wrong struct type is specified).
Simplify the macro by just not declaring any class struct, allowing us to remove the class_size field from the TypeInfo variables for those types.
Message-Id: <[email protected]>
--- include/authz/list.h | 2 +- include/authz/listfile.h | 2 +- include/authz/pamacct.h | 2 +- include/authz/simple.h | 2 +- include/crypto/secret_keyring.h | 2 +- include/io/dns-resolver.h | 2 +- include/io/net-listener.h | 2 +- include/qom/object.h | 16 ++++++++-------- include/sysemu/vhost-user-backend.h | 2 +- authz/list.c | 1 - authz/listfile.c | 1 - authz/pamacct.c | 1 - authz/simple.c | 1 - backends/dbus-vmstate.c | 3 +-- backends/vhost-user.c | 1 - crypto/secret_keyring.c | 1 - io/dns-resolver.c | 1 - io/net-listener.c | 1 - ui/input-barrier.c | 3 +-- ui/input-linux.c | 3 +-- 20 files changed, 19 insertions(+), 30 deletions(-)
include/authz/list.h +1 -1
@@ -28,7 +28,7 @@#define TYPE_QAUTHZ_LIST "authz-list"OBJECT_DECLARE_SIMPLE_TYPE (QAuthZList, qauthz_list, -QAUTHZ_LIST , QAuthZClass) +QAUTHZ_LIST )
include/authz/listfile.h +1 -1
@@ -28,7 +28,7 @@#define TYPE_QAUTHZ_LIST_FILE "authz-list-file"OBJECT_DECLARE_SIMPLE_TYPE (QAuthZListFile, qauthz_list_file, -QAUTHZ_LIST_FILE , QAuthZClass) +QAUTHZ_LIST_FILE )
include/authz/pamacct.h +1 -1
@@ -28,7 +28,7 @@#define TYPE_QAUTHZ_PAM "authz-pam"OBJECT_DECLARE_SIMPLE_TYPE (QAuthZPAM, qauthz_pam, -QAUTHZ_PAM , QAuthZClass) +QAUTHZ_PAM )
include/authz/simple.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_QAUTHZ_SIMPLE "authz-simple"OBJECT_DECLARE_SIMPLE_TYPE (QAuthZSimple, qauthz_simple, -QAUTHZ_SIMPLE , QAuthZClass) +QAUTHZ_SIMPLE )
include/crypto/secret_keyring.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_QCRYPTO_SECRET_KEYRING "secret_keyring"OBJECT_DECLARE_SIMPLE_TYPE (QCryptoSecretKeyring, qcrypto_secret_keyring, - QCRYPTO_SECRET_KEYRING, QCryptoSecretCommonClass) + QCRYPTO_SECRET_KEYRING)struct QCryptoSecretKeyring {
include/io/dns-resolver.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver"OBJECT_DECLARE_SIMPLE_TYPE (QIODNSResolver, qio_dns_resolver, -QIO_DNS_RESOLVER , ObjectClass) +QIO_DNS_RESOLVER )/**
include/io/net-listener.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_QIO_NET_LISTENER "qio-net-listener"OBJECT_DECLARE_SIMPLE_TYPE (QIONetListener, qio_net_listener, - QIO_NET_LISTENER, ObjectClass) + QIO_NET_LISTENER) typedef void (*QIONetListenerClientFunc)(QIONetListener *listener,
include/qom/object.h +8 -8
@@ -639,19 +639,19 @@ struct Object* @InstanceType: instance struct name * @module_obj_name: the object name in lowercase with underscore separators * @MODULE_OBJ_NAME: the object name in uppercase with underscore separators -* @ParentClassType: class struct name of parent type * -* This does the same as OBJECT_DECLARE_TYPE(), but also declares -* the class struct, thus only the object struct needs to be declare -* manually. +* This does the same as OBJECT_DECLARE_TYPE(), but with no class struct +* declared. * * This macro should be used unless the class struct needs to have * virtual methods declared. */ -#define OBJECT_DECLARE_SIMPLE_TYPE (InstanceType, module_obj_name, \ -MODULE_OBJ_NAME , ParentClassType) \ - OBJECT_DECLARE_TYPE(InstanceType, InstanceType##Class, module_obj_name, MODULE_OBJ_NAME) \ - struct InstanceType##Class { ParentClassType parent_class; }; +#define OBJECT_DECLARE_SIMPLE_TYPE (InstanceType, module_obj_name,MODULE_OBJ_NAME ) \ + typedef struct InstanceType InstanceType; \ + \ + G_DEFINE_AUTOPTR_CLEANUP_FUNC(InstanceType, object_unref) \ + \ + DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)/**
include/sysemu/vhost-user-backend.h +1 -1
@@ -23,7 +23,7 @@#define TYPE_VHOST_USER_BACKEND "vhost-user-backend"OBJECT_DECLARE_SIMPLE_TYPE (VhostUserBackend, vhost_user_backend, -VHOST_USER_BACKEND , ObjectClass) +VHOST_USER_BACKEND )
authz/list.c +0 -1
@@ -252,7 +252,6 @@ static const TypeInfo qauthz_list_info = { .name = TYPE_QAUTHZ_LIST, .instance_size = sizeof(QAuthZList), .instance_finalize = qauthz_list_finalize, - .class_size = sizeof(QAuthZListClass), .class_init = qauthz_list_class_init, .interfaces = (InterfaceInfo []) { {TYPE_USER_CREATABLE },
authz/listfile.c +0 -1
@@ -263,7 +263,6 @@ static const TypeInfo qauthz_list_file_info = { .instance_init = qauthz_list_file_init, .instance_size = sizeof(QAuthZListFile), .instance_finalize = qauthz_list_file_finalize, - .class_size = sizeof(QAuthZListFileClass), .class_init = qauthz_list_file_class_init, .interfaces = (InterfaceInfo []) { {TYPE_USER_CREATABLE },
authz/pamacct.c +0 -1
@@ -129,7 +129,6 @@ static const TypeInfo qauthz_pam_info = { .name = TYPE_QAUTHZ_PAM, .instance_size = sizeof(QAuthZPAM), .instance_finalize = qauthz_pam_finalize, - .class_size = sizeof(QAuthZPAMClass), .class_init = qauthz_pam_class_init, .interfaces = (InterfaceInfo []) { {TYPE_USER_CREATABLE },
authz/simple.c +0 -1
@@ -96,7 +96,6 @@ static const TypeInfo qauthz_simple_info = { .name = TYPE_QAUTHZ_SIMPLE, .instance_size = sizeof(QAuthZSimple), .instance_finalize = qauthz_simple_finalize, - .class_size = sizeof(QAuthZSimpleClass), .class_init = qauthz_simple_class_init, .interfaces = (InterfaceInfo []) { {TYPE_USER_CREATABLE },
backends/dbus-vmstate.c +1 -2
@@ -24,7 +24,7 @@#define TYPE_DBUS_VMSTATE "dbus-vmstate"OBJECT_DECLARE_SIMPLE_TYPE (DBusVMState, dbus_vmstate, - DBUS_VMSTATE, ObjectClass) + DBUS_VMSTATE)struct DBusVMState {
@@ -483,7 +483,6 @@ static const TypeInfo dbus_vmstate_info = { .parent = TYPE_OBJECT, .instance_size = sizeof(DBusVMState), .instance_finalize = dbus_vmstate_finalize, - .class_size = sizeof(DBusVMStateClass), .class_init = dbus_vmstate_class_init, .interfaces = (InterfaceInfo []) { {TYPE_USER_CREATABLE },
backends/vhost-user.c +0 -1
@@ -197,7 +197,6 @@ static const TypeInfo vhost_user_backend_info = { .instance_size = sizeof(VhostUserBackend), .instance_init = vhost_user_backend_init, .instance_finalize = vhost_user_backend_finalize, - .class_size = sizeof(VhostUserBackendClass), };static void register_types (void )
crypto/secret_keyring.c +0 -1
@@ -129,7 +129,6 @@ static const TypeInfo qcrypto_secret_info = { .parent = TYPE_QCRYPTO_SECRET_COMMON, .name = TYPE_QCRYPTO_SECRET_KEYRING, .instance_size = sizeof(QCryptoSecretKeyring), - .class_size = sizeof(QCryptoSecretKeyringClass), .class_init = qcrypto_secret_keyring_class_init, .interfaces = (InterfaceInfo []) { {TYPE_USER_CREATABLE },
io/dns-resolver.c +0 -1
@@ -267,7 +267,6 @@ static const TypeInfo qio_dns_resolver_info = { .parent = TYPE_OBJECT, .name = TYPE_QIO_DNS_RESOLVER, .instance_size = sizeof(QIODNSResolver), - .class_size = sizeof(QIODNSResolverClass), };
io/net-listener.c +0 -1
@@ -307,7 +307,6 @@ static const TypeInfo qio_net_listener_info = { .name = TYPE_QIO_NET_LISTENER, .instance_size = sizeof(QIONetListener), .instance_finalize = qio_net_listener_finalize, - .class_size = sizeof(QIONetListenerClass), };
ui/input-barrier.c +1 -2
@@ -21,7 +21,7 @@#define TYPE_INPUT_BARRIER "input-barrier"OBJECT_DECLARE_SIMPLE_TYPE (InputBarrier, input_barrier, - INPUT_BARRIER, ObjectClass) + INPUT_BARRIER)#define MAX_HELLO_LENGTH 1024
@@ -723,7 +723,6 @@ static void input_barrier_class_init(ObjectClass *oc, void *data)static const TypeInfo input_barrier_info = { .name =TYPE_INPUT_BARRIER , .parent =TYPE_OBJECT , - .class_size =sizeof (InputBarrierClass), .class_init = input_barrier_class_init, .instance_size =sizeof (InputBarrier), .instance_init = input_barrier_instance_init,
ui/input-linux.c +1 -2
@@ -32,7 +32,7 @@ static bool linux_is_button(unsigned int lnx)#define TYPE_INPUT_LINUX "input-linux"OBJECT_DECLARE_SIMPLE_TYPE (InputLinux, input_linux, - INPUT_LINUX, ObjectClass) + INPUT_LINUX)struct InputLinux {
@@ -514,7 +514,6 @@ static void input_linux_class_init(ObjectClass *oc, void *data)static const TypeInfo input_linux_info = { .name =TYPE_INPUT_LINUX , .parent =TYPE_OBJECT , - .class_size =sizeof (InputLinuxClass), .class_init = input_linux_class_init, .instance_size =sizeof (InputLinux), .instance_init = input_linux_instance_init,
Signature · 1 line
2.26.2
[PULL 02/17] sifive_u: Rename memmap enum constants
In reply to Eduardo HabkostSome of the enum constant names conflict with the QOM type check macros (SIFIVE_U_OTP, SIFIVE_U_PRCI). This needs to be addressed to allow us to transform the QOM type check macros into functions generated by OBJECT_DECLARE_TYPE().
Rename all the constants to SIFIVE_U_DEV_*, to avoid conflicts.
Message-Id: <[email protected]>
--- include/hw/riscv/sifive_u.h | 34 ++++---- hw/riscv/sifive_u.c | 156 ++++++++++++++++++------------------ 2 files changed, 95 insertions(+), 95 deletions(-)
include/hw/riscv/sifive_u.h +17 -17
@@ -70,23 +70,23 @@ typedef struct SiFiveUState { } SiFiveUState;enum { -SIFIVE_U_DEBUG , -SIFIVE_U_MROM , -SIFIVE_U_CLINT , -SIFIVE_U_L2CC , -SIFIVE_U_PDMA , -SIFIVE_U_L2LIM , -SIFIVE_U_PLIC , -SIFIVE_U_PRCI , -SIFIVE_U_UART0 , -SIFIVE_U_UART1 , -SIFIVE_U_GPIO , -SIFIVE_U_OTP , -SIFIVE_U_DMC , -SIFIVE_U_FLASH0 , -SIFIVE_U_DRAM , -SIFIVE_U_GEM , -SIFIVE_U_GEM_MGMT +SIFIVE_U_DEV_DEBUG , +SIFIVE_U_DEV_MROM , +SIFIVE_U_DEV_CLINT , +SIFIVE_U_DEV_L2CC , +SIFIVE_U_DEV_PDMA , +SIFIVE_U_DEV_L2LIM , +SIFIVE_U_DEV_PLIC , +SIFIVE_U_DEV_PRCI , +SIFIVE_U_DEV_UART0 , +SIFIVE_U_DEV_UART1 , +SIFIVE_U_DEV_GPIO , +SIFIVE_U_DEV_OTP , +SIFIVE_U_DEV_DMC , +SIFIVE_U_DEV_FLASH0 , +SIFIVE_U_DEV_DRAM , +SIFIVE_U_DEV_GEM , +SIFIVE_U_DEV_GEM_MGMT };enum {
hw/riscv/sifive_u.c +78 -78
372 lines not on this page · raw message
Signature · 1 line
2.26.2
[PULL 06/17] qom: Clean up object_property_get_enum()'s error value
In reply to Eduardo HabkostFrom: Markus Armbruster <[email protected]>
object_property_get_enum() is the only object_property_FOO() that is documented to return an undefined value on error. It does no such thing, actually: it returns 0 on some errors, and -1 on others.
Needlessly complicated. Always return -1 on error, and adjust the contract.
Message-Id: <[email protected]>
--- include/qom/object.h | 6 +++--- qom/object.c | 6 +++--- tests/check-qom-proplist.c | 2 ++ 3 files changed, 8 insertions(+), 6 deletions(-)
include/qom/object.h +3 -3
@@ -1687,9 +1687,9 @@ uint64_t object_property_get_uint(Object *obj, const char *name,* @typename: the name of the enum data type * @errp: returns an error if this function fails * -* Returns: the value of the property, converted to an integer, or -* undefined if an error occurs (including when the property value is not -* an enum). +* Returns: the value of the property, converted to an integer (which +* can't be negative), or -1 on error (including when the property +* value is not an enum). */ int object_property_get_enum (Object *obj,const char *name,const char *typename,Error **errp);
qom/object.c +3 -3
@@ -1564,21 +1564,21 @@ int object_property_get_enum(Object *obj, const char *name,EnumProperty *enumprop;if (prop ==NULL ) { -return 0 ; +return -1 ; }if (!g_str_equal (prop->type, typename)) {error_setg (errp,"Property %s on %s is not '%s' enum type" , name,object_class_get_name (object_get_class (obj)), typename); -return 0 ; +return -1 ; } enumprop = prop->opaque; str =object_property_get_str (obj, name, errp);if (!str) { -return 0 ; +return -1 ; } ret =qapi_enum_parse (enumprop->lookup, str,-1 , errp);
tests/check-qom-proplist.c +2 -0
@@ -491,6 +491,7 @@ static void test_dummy_getenum(void)"av" ,"BadAnimal" , &err); +g_assert (val ==-1 );error_free_or_abort (&err);/* A non-enum property name */
@@ -498,6 +499,7 @@ static void test_dummy_getenum(void)"iv" ,"DummyAnimal" , &err); +g_assert (val ==-1 );error_free_or_abort (&err);object_unparent (OBJECT (dobj));
Signature · 1 line
2.26.2
[PULL 16/17] Use OBJECT_DECLARE_TYPE when possible
In reply to Eduardo HabkostThis converts existing DECLARE_OBJ_CHECKERS usage to OBJECT_DECLARE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]')
Message-Id: <[email protected]>
--- hw/ppc/e500.h | 5 +---- hw/s390x/ccw-device.h | 4 +--- hw/s390x/virtio-ccw.h | 5 +---- hw/usb/ccid.h | 5 +---- hw/usb/hcd-dwc2.h | 3 +-- hw/usb/hcd-ehci.h | 5 +---- hw/virtio/virtio-pci.h | 5 +---- include/chardev/char.h | 4 +--- include/hw/arm/aspeed_soc.h | 5 +---- include/hw/arm/bcm2836.h | 5 +---- include/hw/arm/smmu-common.h | 5 +---- include/hw/arm/smmuv3.h | 5 +---- include/hw/arm/virt.h | 5 +---- include/hw/boards.h | 3 +-- include/hw/display/macfb.h | 5 +---- include/hw/gpio/aspeed_gpio.h | 5 +---- include/hw/i2c/aspeed_i2c.h | 5 +---- include/hw/i386/ioapic_internal.h | 5 +---- include/hw/i386/microvm.h | 5 +---- include/hw/i386/pc.h | 4 +--- include/hw/i386/x86-iommu.h | 5 +---- include/hw/i386/x86.h | 5 +---- include/hw/ide/internal.h | 4 +--- include/hw/input/adb.h | 4 +--- include/hw/isa/i8259_internal.h | 5 +---- include/hw/isa/isa.h | 4 +--- include/hw/mem/nvdimm.h | 5 +---- include/hw/misc/aspeed_scu.h | 5 +---- include/hw/misc/aspeed_sdmc.h | 5 +---- include/hw/misc/imx_ccm.h | 5 +---- include/hw/misc/mos6522.h | 5 +---- include/hw/pci-host/pnv_phb4.h | 5 +---- include/hw/pci/pci.h | 4 +--- include/hw/pci/pci_host.h | 4 +--- include/hw/pcmcia.h | 5 +---- include/hw/ppc/spapr.h | 5 +---- include/hw/qdev-core.h | 4 +--- include/hw/rtc/allwinner-rtc.h | 5 +---- include/hw/s390x/3270-ccw.h | 5 +---- include/hw/s390x/s390-virtio-ccw.h | 5 +---- include/hw/s390x/storage-attributes.h | 5 +---- include/hw/s390x/storage-keys.h | 5 +---- include/hw/s390x/tod.h | 5 +---- include/hw/scsi/scsi.h | 4 +--- include/hw/sd/allwinner-sdhost.h | 5 +---- include/hw/sd/sd.h | 5 +---- include/hw/ssi/aspeed_smc.h | 5 +---- include/hw/ssi/xilinx_spips.h | 4 +--- include/hw/timer/aspeed_timer.h | 5 +---- include/hw/timer/i8254.h | 5 +---- include/hw/usb.h | 4 +--- include/hw/virtio/virtio.h | 4 +--- include/hw/watchdog/wdt_aspeed.h | 5 +---- include/hw/xen/xen-block.h | 4 +--- include/hw/xen/xen-bus.h | 4 +--- include/net/can_host.h | 5 +---- include/net/filter.h | 4 +--- include/ui/console.h | 4 +--- hw/arm/mps2-tz.c | 5 +---- hw/arm/mps2.c | 5 +---- hw/arm/musca.c | 5 +---- hw/arm/spitz.c | 5 +---- hw/arm/vexpress.c | 5 +---- hw/block/m25p80.c | 5 +---- hw/input/adb-kbd.c | 5 +---- hw/input/adb-mouse.c | 5 +---- hw/misc/tmp421.c | 5 +---- hw/scsi/scsi-disk.c | 5 +---- hw/scsi/vmw_pvscsi.c | 5 +---- 69 files changed, 69 insertions(+), 255 deletions(-)
hw/ppc/e500.h +1 -4
@@ -14,7 +14,6 @@ struct PPCE500MachineState {*/ PlatformBusDevice *pbus_dev; }; -typedef struct PPCE500MachineState PPCE500MachineState ;struct PPCE500MachineClass {/*< private >*/
@@ -39,14 +38,12 @@ struct PPCE500MachineClass {hwaddr pci_mmio_bus_base;hwaddr spin_base; }; -typedef struct PPCE500MachineClass PPCE500MachineClass ;void ppce500_init (MachineState *machine);hwaddr booke206_page_size_to_tlb (uint64_t size);#define TYPE_PPCE500_MACHINE "ppce500-base-machine" -DECLARE_OBJ_CHECKERS (PPCE500MachineState, PPCE500MachineClass, - PPCE500_MACHINE, TYPE_PPCE500_MACHINE) +OBJECT_DECLARE_TYPE(PPCE500MachineState, PPCE500MachineClass, PPCE500_MACHINE)#endif
hw/s390x/ccw-device.h +1 -3
@@ -38,7 +38,6 @@ struct CCWDeviceClass {void (*realize)(CcwDevice *,Error **);void (*refill_ids)(CcwDevice *); }; -typedef struct CCWDeviceClass CCWDeviceClass ;static inline CcwDevice *to_ccw_dev_fast (DeviceState *d) {
@@ -47,7 +46,6 @@ static inline CcwDevice *to_ccw_dev_fast(DeviceState *d)#define TYPE_CCW_DEVICE "ccw-device" -DECLARE_OBJ_CHECKERS (CcwDevice, CCWDeviceClass, - CCW_DEVICE, TYPE_CCW_DEVICE) +OBJECT_DECLARE_TYPE(CcwDevice, CCWDeviceClass, CCW_DEVICE)#endif
hw/s390x/virtio-ccw.h +1 -4
@@ -54,10 +54,7 @@#define CCW_CMD_SET_VIRTIO_REV 0x83#define TYPE_VIRTIO_CCW_DEVICE "virtio-ccw-device" -typedef struct VirtIOCCWDeviceClass VirtIOCCWDeviceClass ; -typedef struct VirtioCcwDevice VirtioCcwDevice ; -DECLARE_OBJ_CHECKERS (VirtioCcwDevice, VirtIOCCWDeviceClass, - VIRTIO_CCW_DEVICE, TYPE_VIRTIO_CCW_DEVICE) +OBJECT_DECLARE_TYPE(VirtioCcwDevice, VirtIOCCWDeviceClass, VIRTIO_CCW_DEVICE)typedef struct VirtioBusState VirtioCcwBusState ;typedef struct VirtioBusClass VirtioCcwBusClass ;
hw/usb/ccid.h +1 -4
@@ -13,13 +13,10 @@#include "hw/qdev-core.h" #include "qom/object.h" -typedef struct CCIDCardState CCIDCardState ;typedef struct CCIDCardInfo CCIDCardInfo ;#define TYPE_CCID_CARD "ccid-card" -typedef struct CCIDCardClass CCIDCardClass ; -DECLARE_OBJ_CHECKERS (CCIDCardState, CCIDCardClass, -CCID_CARD ,TYPE_CCID_CARD ) +OBJECT_DECLARE_TYPE (CCIDCardState, CCIDCardClass,CCID_CARD )/* * callbacks to be used by the CCID device (hw/usb-ccid.c) to call
hw/usb/hcd-dwc2.h +1 -2
@@ -181,7 +181,6 @@ struct DWC2Class { }; #define TYPE_DWC2_USB "dwc2-usb" -DECLARE_OBJ_CHECKERS(DWC2State, DWC2Class, - DWC2_USB, TYPE_DWC2_USB) +OBJECT_DECLARE_TYPE(DWC2State, DWC2Class, DWC2_USB)#endif
hw/usb/hcd-ehci.h +1 -4
@@ -350,10 +350,7 @@ struct EHCIPCIState {#define TYPE_PPC4xx_EHCI "ppc4xx-ehci-usb"#define TYPE_FUSBH200_EHCI "fusbh200-ehci-usb" -typedef struct EHCISysBusState EHCISysBusState ; -typedef struct SysBusEHCIClass SysBusEHCIClass ; -DECLARE_OBJ_CHECKERS (EHCISysBusState, SysBusEHCIClass, - SYS_BUS_EHCI, TYPE_SYS_BUS_EHCI) +OBJECT_DECLARE_TYPE(EHCISysBusState, SysBusEHCIClass, SYS_BUS_EHCI)struct EHCISysBusState {/*< private >*/
hw/virtio/virtio-pci.h +1 -4
@@ -19,7 +19,6 @@#include "hw/virtio/virtio-bus.h" #include "qom/object.h" -typedef struct VirtIOPCIProxy VirtIOPCIProxy ;/* virtio-pci-bus */
@@ -91,9 +90,7 @@ typedef struct {* virtio-pci: This is the PCIDevice which has a virtio-pci-bus. */ #define TYPE_VIRTIO_PCI "virtio-pci" -typedef struct VirtioPCIClass VirtioPCIClass ; -DECLARE_OBJ_CHECKERS (VirtIOPCIProxy, VirtioPCIClass, - VIRTIO_PCI, TYPE_VIRTIO_PCI) +OBJECT_DECLARE_TYPE(VirtIOPCIProxy, VirtioPCIClass, VIRTIO_PCI)struct VirtioPCIClass {PCIDeviceClass parent_class;
include/chardev/char.h +1 -3
@@ -226,9 +226,7 @@ int qemu_chr_write(Chardev *s, const uint8_t *buf, int len, bool write_all);int qemu_chr_wait_connected (Chardev *chr,Error **errp);#define TYPE_CHARDEV "chardev" -typedef struct ChardevClass ChardevClass ; -DECLARE_OBJ_CHECKERS (Chardev, ChardevClass, - CHARDEV, TYPE_CHARDEV) +OBJECT_DECLARE_TYPE(Chardev, ChardevClass, CHARDEV)#define TYPE_CHARDEV_NULL "chardev-null"#define TYPE_CHARDEV_MUX "chardev-mux"
include/hw/arm/aspeed_soc.h +1 -4
@@ -62,12 +62,9 @@ struct AspeedSoCState {AspeedSDHCIState sdhci;AspeedSDHCIState emmc; }; -typedef struct AspeedSoCState AspeedSoCState ;#define TYPE_ASPEED_SOC "aspeed-soc" -typedef struct AspeedSoCClass AspeedSoCClass ; -DECLARE_OBJ_CHECKERS (AspeedSoCState, AspeedSoCClass, - ASPEED_SOC, TYPE_ASPEED_SOC) +OBJECT_DECLARE_TYPE(AspeedSoCState, AspeedSoCClass, ASPEED_SOC)struct AspeedSoCClass {DeviceClass parent_class;
include/hw/arm/bcm2836.h +1 -4
@@ -18,10 +18,7 @@#include "qom/object.h" #define TYPE_BCM283X "bcm283x" -typedef struct BCM283XClass BCM283XClass ; -typedef struct BCM283XState BCM283XState ; -DECLARE_OBJ_CHECKERS (BCM283XState, BCM283XClass, - BCM283X, TYPE_BCM283X) +OBJECT_DECLARE_TYPE(BCM283XState, BCM283XClass, BCM283X)#define BCM283X_NCPUS 4
include/hw/arm/smmu-common.h +1 -4
@@ -118,7 +118,6 @@ struct SMMUState {uint8_t bus_num;PCIBus *primary_bus; }; -typedef struct SMMUState SMMUState ;struct SMMUBaseClass {/* <private> */
@@ -129,11 +128,9 @@ struct SMMUBaseClass {DeviceRealize parent_realize; }; -typedef struct SMMUBaseClass SMMUBaseClass ;#define TYPE_ARM_SMMU "arm-smmu" -DECLARE_OBJ_CHECKERS (SMMUState, SMMUBaseClass, -ARM_SMMU ,TYPE_ARM_SMMU ) +OBJECT_DECLARE_TYPE (SMMUState, SMMUBaseClass,ARM_SMMU ) /* Return the SMMUPciBus handle associated to a PCI bus number */SMMUPciBus *smmu_find_smmu_pcibus (SMMUState *s,uint8_t bus_num);
include/hw/arm/smmuv3.h +1 -4
@@ -63,7 +63,6 @@ struct SMMUv3State {qemu_irq irq[4 ];QemuMutex mutex; }; -typedef struct SMMUv3State SMMUv3State ; typedef enum { SMMU_IRQ_EVTQ,
@@ -80,10 +79,8 @@ struct SMMUv3Class {DeviceRealize parent_realize;DeviceReset parent_reset; }; -typedef struct SMMUv3Class SMMUv3Class ;#define TYPE_ARM_SMMUV3 "arm-smmuv3" -DECLARE_OBJ_CHECKERS (SMMUv3State, SMMUv3Class, - ARM_SMMUV3, TYPE_ARM_SMMUV3) +OBJECT_DECLARE_TYPE(SMMUv3State, SMMUv3Class, ARM_SMMUV3)#endif
include/hw/arm/virt.h +1 -4
@@ -128,7 +128,6 @@ struct VirtMachineClass {bool kvm_no_adjvtime;bool acpi_expose_flash; }; -typedef struct VirtMachineClass VirtMachineClass ;struct VirtMachineState {MachineState parent;
@@ -165,13 +164,11 @@ struct VirtMachineState {DeviceState *acpi_dev;Notifier powerdown_notifier; }; -typedef struct VirtMachineState VirtMachineState ;#define VIRT_ECAM_ID (high) (high ? VIRT_HIGH_PCIE_ECAM : VIRT_PCIE_ECAM)#define TYPE_VIRT_MACHINE MACHINE_TYPE_NAME("virt") -DECLARE_OBJ_CHECKERS (VirtMachineState, VirtMachineClass, - VIRT_MACHINE, TYPE_VIRT_MACHINE) +OBJECT_DECLARE_TYPE(VirtMachineState, VirtMachineClass, VIRT_MACHINE)void virt_acpi_setup (VirtMachineState *vms);bool virt_is_acpi_enabled (VirtMachineState *vms);
include/hw/boards.h +1 -2
@@ -21,8 +21,7 @@#define TYPE_MACHINE "machine"#undef MACHINE/* BSD defines it and QEMU does not use it */ -DECLARE_OBJ_CHECKERS (MachineState, MachineClass, - MACHINE, TYPE_MACHINE) +OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE)extern MachineState *current_machine;
include/hw/display/macfb.h +1 -4
@@ -43,10 +43,7 @@ struct MacfbSysBusState { };#define TYPE_NUBUS_MACFB "nubus-macfb" -typedef struct MacfbNubusDeviceClass MacfbNubusDeviceClass ; -typedef struct MacfbNubusState MacfbNubusState ; -DECLARE_OBJ_CHECKERS (MacfbNubusState, MacfbNubusDeviceClass, - NUBUS_MACFB, TYPE_NUBUS_MACFB) +OBJECT_DECLARE_TYPE(MacfbNubusState, MacfbNubusDeviceClass, NUBUS_MACFB)struct MacfbNubusDeviceClass {DeviceClass parent_class;
include/hw/gpio/aspeed_gpio.h +1 -4
@@ -14,10 +14,7 @@#include "qom/object.h" #define TYPE_ASPEED_GPIO "aspeed.gpio" -typedef struct AspeedGPIOClass AspeedGPIOClass ; -typedef struct AspeedGPIOState AspeedGPIOState ; -DECLARE_OBJ_CHECKERS (AspeedGPIOState, AspeedGPIOClass, - ASPEED_GPIO, TYPE_ASPEED_GPIO) +OBJECT_DECLARE_TYPE(AspeedGPIOState, AspeedGPIOClass, ASPEED_GPIO)#define ASPEED_GPIO_MAX_NR_SETS 8#define ASPEED_REGS_PER_BANK 14
include/hw/i2c/aspeed_i2c.h +1 -4
@@ -29,10 +29,7 @@#define TYPE_ASPEED_2400_I2C TYPE_ASPEED_I2C "-ast2400"#define TYPE_ASPEED_2500_I2C TYPE_ASPEED_I2C "-ast2500"#define TYPE_ASPEED_2600_I2C TYPE_ASPEED_I2C "-ast2600" -typedef struct AspeedI2CClass AspeedI2CClass ; -typedef struct AspeedI2CState AspeedI2CState ; -DECLARE_OBJ_CHECKERS (AspeedI2CState, AspeedI2CClass, - ASPEED_I2C, TYPE_ASPEED_I2C) +OBJECT_DECLARE_TYPE(AspeedI2CState, AspeedI2CClass, ASPEED_I2C)#define ASPEED_I2C_NR_BUSSES 16#define ASPEED_I2C_MAX_POOL_SIZE 0x800
include/hw/i386/ioapic_internal.h +1 -4
@@ -82,12 +82,9 @@#define IOAPIC_VER_ENTRIES_SHIFT 16 -typedef struct IOAPICCommonState IOAPICCommonState ;#define TYPE_IOAPIC_COMMON "ioapic-common" -typedef struct IOAPICCommonClass IOAPICCommonClass ; -DECLARE_OBJ_CHECKERS (IOAPICCommonState, IOAPICCommonClass, - IOAPIC_COMMON, TYPE_IOAPIC_COMMON) +OBJECT_DECLARE_TYPE(IOAPICCommonState, IOAPICCommonClass, IOAPIC_COMMON)struct IOAPICCommonClass {SysBusDeviceClass parent_class;
include/hw/i386/microvm.h +1 -4
@@ -50,7 +50,6 @@ struct MicrovmMachineClass { HotplugHandler *(*orig_hotplug_handler)(MachineState *machine, DeviceState *dev); }; -typedef struct MicrovmMachineClass MicrovmMachineClass ;struct MicrovmMachineState {X86MachineState parent;
@@ -69,10 +68,8 @@ struct MicrovmMachineState {Notifier machine_done;Notifier powerdown_req; }; -typedef struct MicrovmMachineState MicrovmMachineState ;#define TYPE_MICROVM_MACHINE MACHINE_TYPE_NAME("microvm") -DECLARE_OBJ_CHECKERS (MicrovmMachineState, MicrovmMachineClass, - MICROVM_MACHINE, TYPE_MICROVM_MACHINE) +OBJECT_DECLARE_TYPE(MicrovmMachineState, MicrovmMachineClass, MICROVM_MACHINE)#endif
include/hw/i386/pc.h +1 -3
@@ -119,11 +119,9 @@ struct PCMachineClass {/* use PVH to load kernels that support this feature */ bool pvh_enabled; }; -typedef struct PCMachineClass PCMachineClass ;#define TYPE_PC_MACHINE "generic-pc-machine" -DECLARE_OBJ_CHECKERS (PCMachineState, PCMachineClass, -PC_MACHINE ,TYPE_PC_MACHINE ) +OBJECT_DECLARE_TYPE (PCMachineState, PCMachineClass,PC_MACHINE )/* ioapic.c */
include/hw/i386/x86-iommu.h +1 -4
@@ -26,10 +26,7 @@#include "qom/object.h" #define TYPE_X86_IOMMU_DEVICE ("x86-iommu") -typedef struct X86IOMMUClass X86IOMMUClass ; -typedef struct X86IOMMUState X86IOMMUState ; -DECLARE_OBJ_CHECKERS (X86IOMMUState, X86IOMMUClass, - X86_IOMMU_DEVICE, TYPE_X86_IOMMU_DEVICE) +OBJECT_DECLARE_TYPE(X86IOMMUState, X86IOMMUClass, X86_IOMMU_DEVICE)#define X86_IOMMU_SID_INVALID (0xffff)
include/hw/i386/x86.h +1 -4
@@ -39,7 +39,6 @@ struct X86MachineClass {/* Enables contiguous-apic-ID mode */ bool compat_apic_id_mode; }; -typedef struct X86MachineClass X86MachineClass ;struct X86MachineState {/*< private >*/
@@ -72,14 +71,12 @@ struct X86MachineState {*/ AddressSpace *ioapic_as; }; -typedef struct X86MachineState X86MachineState ;#define X86_MACHINE_SMM "smm"#define X86_MACHINE_ACPI "acpi"#define TYPE_X86_MACHINE MACHINE_TYPE_NAME("x86") -DECLARE_OBJ_CHECKERS (X86MachineState, X86MachineClass, - X86_MACHINE, TYPE_X86_MACHINE) +OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE)void init_topo_info (X86CPUTopoInfo *topo_info,const X86MachineState *x86ms);
include/hw/ide/internal.h +1 -3
@@ -488,9 +488,7 @@ struct IDEBus { };#define TYPE_IDE_DEVICE "ide-device" -typedef struct IDEDeviceClass IDEDeviceClass ; -DECLARE_OBJ_CHECKERS (IDEDevice, IDEDeviceClass, - IDE_DEVICE, TYPE_IDE_DEVICE) +OBJECT_DECLARE_TYPE(IDEDevice, IDEDeviceClass, IDE_DEVICE)struct IDEDeviceClass {DeviceClass parent_class;
include/hw/input/adb.h +1 -3
@@ -43,9 +43,7 @@ typedef int ADBDeviceRequest(ADBDevice *d, uint8_t *buf_out,typedef bool ADBDeviceHasData (ADBDevice *d);#define TYPE_ADB_DEVICE "adb-device" -typedef struct ADBDeviceClass ADBDeviceClass ; -DECLARE_OBJ_CHECKERS (ADBDevice, ADBDeviceClass, - ADB_DEVICE, TYPE_ADB_DEVICE) +OBJECT_DECLARE_TYPE(ADBDevice, ADBDeviceClass, ADB_DEVICE)struct ADBDevice {/*< private >*/
include/hw/isa/i8259_internal.h +1 -4
@@ -30,12 +30,9 @@#include "hw/intc/i8259.h" #include "qom/object.h" -typedef struct PICCommonState PICCommonState ;#define TYPE_PIC_COMMON "pic-common" -typedef struct PICCommonClass PICCommonClass ; -DECLARE_OBJ_CHECKERS (PICCommonState, PICCommonClass, - PIC_COMMON, TYPE_PIC_COMMON) +OBJECT_DECLARE_TYPE(PICCommonState, PICCommonClass, PIC_COMMON)struct PICCommonClass {ISADeviceClass parent_class;
include/hw/isa/isa.h +1 -3
@@ -11,9 +11,7 @@#define ISA_NUM_IRQS 16#define TYPE_ISA_DEVICE "isa-device" -typedef struct ISADeviceClass ISADeviceClass ; -DECLARE_OBJ_CHECKERS (ISADevice, ISADeviceClass, - ISA_DEVICE, TYPE_ISA_DEVICE) +OBJECT_DECLARE_TYPE(ISADevice, ISADeviceClass, ISA_DEVICE)#define TYPE_ISA_BUS "ISA" DECLARE_INSTANCE_CHECKER(ISABus, ISA_BUS,
include/hw/mem/nvdimm.h +1 -4
@@ -46,10 +46,7 @@#define MIN_NAMESPACE_LABEL_SIZE (128UL << 10)#define TYPE_NVDIMM "nvdimm" -typedef struct NVDIMMClass NVDIMMClass ; -typedef struct NVDIMMDevice NVDIMMDevice ; -DECLARE_OBJ_CHECKERS (NVDIMMDevice, NVDIMMClass, - NVDIMM, TYPE_NVDIMM) +OBJECT_DECLARE_TYPE(NVDIMMDevice, NVDIMMClass, NVDIMM)#define NVDIMM_LABEL_SIZE_PROP "label-size"#define NVDIMM_UUID_PROP "uuid"
include/hw/misc/aspeed_scu.h +1 -4
@@ -15,10 +15,7 @@#include "qom/object.h" #define TYPE_ASPEED_SCU "aspeed.scu" -typedef struct AspeedSCUClass AspeedSCUClass ; -typedef struct AspeedSCUState AspeedSCUState ; -DECLARE_OBJ_CHECKERS (AspeedSCUState, AspeedSCUClass, - ASPEED_SCU, TYPE_ASPEED_SCU) +OBJECT_DECLARE_TYPE(AspeedSCUState, AspeedSCUClass, ASPEED_SCU)#define TYPE_ASPEED_2400_SCU TYPE_ASPEED_SCU "-ast2400"#define TYPE_ASPEED_2500_SCU TYPE_ASPEED_SCU "-ast2500"#define TYPE_ASPEED_2600_SCU TYPE_ASPEED_SCU "-ast2600"
include/hw/misc/aspeed_sdmc.h +1 -4
@@ -13,10 +13,7 @@#include "qom/object.h" #define TYPE_ASPEED_SDMC "aspeed.sdmc" -typedef struct AspeedSDMCClass AspeedSDMCClass ; -typedef struct AspeedSDMCState AspeedSDMCState ; -DECLARE_OBJ_CHECKERS (AspeedSDMCState, AspeedSDMCClass, - ASPEED_SDMC, TYPE_ASPEED_SDMC) +OBJECT_DECLARE_TYPE(AspeedSDMCState, AspeedSDMCClass, ASPEED_SDMC)#define TYPE_ASPEED_2400_SDMC TYPE_ASPEED_SDMC "-ast2400"#define TYPE_ASPEED_2500_SDMC TYPE_ASPEED_SDMC "-ast2500"#define TYPE_ASPEED_2600_SDMC TYPE_ASPEED_SDMC "-ast2600"
include/hw/misc/imx_ccm.h +1 -4
@@ -28,10 +28,7 @@#define PLL_MFN (x) (((x) & 0x3ff) << 0)#define TYPE_IMX_CCM "imx.ccm" -typedef struct IMXCCMClass IMXCCMClass ; -typedef struct IMXCCMState IMXCCMState ; -DECLARE_OBJ_CHECKERS (IMXCCMState, IMXCCMClass, - IMX_CCM, TYPE_IMX_CCM) +OBJECT_DECLARE_TYPE(IMXCCMState, IMXCCMClass, IMX_CCM)struct IMXCCMState {/* <private> */
include/hw/misc/mos6522.h +1 -4
@@ -122,12 +122,9 @@ struct MOS6522State {qemu_irq irq; }; -typedef struct MOS6522State MOS6522State ;#define TYPE_MOS6522 "mos6522" -typedef struct MOS6522DeviceClass MOS6522DeviceClass ; -DECLARE_OBJ_CHECKERS (MOS6522State, MOS6522DeviceClass, - MOS6522, TYPE_MOS6522) +OBJECT_DECLARE_TYPE(MOS6522State, MOS6522DeviceClass, MOS6522)struct MOS6522DeviceClass {DeviceClass parent_class;
include/hw/pci-host/pnv_phb4.h +1 -4
@@ -15,7 +15,6 @@#include "hw/ppc/xive.h" #include "qom/object.h" -typedef struct PnvPhb4PecState PnvPhb4PecState ;typedef struct PnvPhb4PecStack PnvPhb4PecStack ;typedef struct PnvPHB4 PnvPHB4 ;typedef struct PnvChip PnvChip ;
@@ -142,9 +141,7 @@ extern const MemoryRegionOps pnv_phb4_xscom_ops;* PHB4 PEC (PCI Express Controller) */ #define TYPE_PNV_PHB4_PEC "pnv-phb4-pec" -typedef struct PnvPhb4PecClass PnvPhb4PecClass ; -DECLARE_OBJ_CHECKERS (PnvPhb4PecState, PnvPhb4PecClass, - PNV_PHB4_PEC, TYPE_PNV_PHB4_PEC) +OBJECT_DECLARE_TYPE(PnvPhb4PecState, PnvPhb4PecClass, PNV_PHB4_PEC)#define TYPE_PNV_PHB4_PEC_STACK "pnv-phb4-pec-stack" DECLARE_INSTANCE_CHECKER(PnvPhb4PecStack, PNV_PHB4_PEC_STACK,
include/hw/pci/pci.h +1 -3
@@ -394,9 +394,7 @@ typedef int (*pci_map_irq_fn)(PCIDevice *pci_dev, int irq_num);typedef PCIINTxRoute (*pci_route_irq_fn )(void *opaque,int pin);#define TYPE_PCI_BUS "PCI" -typedef struct PCIBusClass PCIBusClass ; -DECLARE_OBJ_CHECKERS (PCIBus, PCIBusClass, - PCI_BUS, TYPE_PCI_BUS) +OBJECT_DECLARE_TYPE(PCIBus, PCIBusClass, PCI_BUS)#define TYPE_PCIE_BUS "PCIE"bool pci_bus_is_express (PCIBus *bus);
include/hw/pci/pci_host.h +1 -3
@@ -32,9 +32,7 @@#include "qom/object.h" #define TYPE_PCI_HOST_BRIDGE "pci-host-bridge" -typedef struct PCIHostBridgeClass PCIHostBridgeClass ; -DECLARE_OBJ_CHECKERS (PCIHostState, PCIHostBridgeClass, - PCI_HOST_BRIDGE, TYPE_PCI_HOST_BRIDGE) +OBJECT_DECLARE_TYPE(PCIHostState, PCIHostBridgeClass, PCI_HOST_BRIDGE)struct PCIHostState {SysBusDevice busdev;
include/hw/pcmcia.h +1 -4
@@ -12,10 +12,7 @@ typedef struct PCMCIASocket { } PCMCIASocket;#define TYPE_PCMCIA_CARD "pcmcia-card" -typedef struct PCMCIACardClass PCMCIACardClass ; -typedef struct PCMCIACardState PCMCIACardState ; -DECLARE_OBJ_CHECKERS (PCMCIACardState, PCMCIACardClass, - PCMCIA_CARD, TYPE_PCMCIA_CARD) +OBJECT_DECLARE_TYPE(PCMCIACardState, PCMCIACardClass, PCMCIA_CARD)struct PCMCIACardState {/*< private >*/
include/hw/ppc/spapr.h +1 -4
@@ -39,12 +39,9 @@ struct SpaprRtcState { };typedef struct SpaprDimmState SpaprDimmState ; -typedef struct SpaprMachineClass SpaprMachineClass ;#define TYPE_SPAPR_MACHINE "spapr-machine" -typedef struct SpaprMachineState SpaprMachineState ; -DECLARE_OBJ_CHECKERS (SpaprMachineState, SpaprMachineClass, - SPAPR_MACHINE, TYPE_SPAPR_MACHINE) +OBJECT_DECLARE_TYPE(SpaprMachineState, SpaprMachineClass, SPAPR_MACHINE) typedef enum { SPAPR_RESIZE_HPT_DEFAULT = 0,
include/hw/qdev-core.h +1 -3
@@ -12,9 +12,7 @@ enum { };#define TYPE_DEVICE "device" -typedef struct DeviceClass DeviceClass ; -DECLARE_OBJ_CHECKERS (DeviceState, DeviceClass, - DEVICE, TYPE_DEVICE) +OBJECT_DECLARE_TYPE(DeviceState, DeviceClass, DEVICE) typedef enum DeviceCategory { DEVICE_CATEGORY_BRIDGE,
include/hw/rtc/allwinner-rtc.h +1 -4
@@ -60,10 +60,7 @@* @{ */ -typedef struct AwRtcClass AwRtcClass ; -typedef struct AwRtcState AwRtcState ; -DECLARE_OBJ_CHECKERS (AwRtcState, AwRtcClass, -AW_RTC ,TYPE_AW_RTC ) +OBJECT_DECLARE_TYPE (AwRtcState, AwRtcClass,AW_RTC )/** @} */
include/hw/s390x/3270-ccw.h +1 -4
@@ -31,10 +31,7 @@#define TC_EWRITEA 0x0d/* Erase write alternate */ #define TC_WRITESF 0x11/* Write structured field */ -typedef struct EmulatedCcw3270Class EmulatedCcw3270Class ; -typedef struct EmulatedCcw3270Device EmulatedCcw3270Device ; -DECLARE_OBJ_CHECKERS (EmulatedCcw3270Device, EmulatedCcw3270Class, - EMULATED_CCW_3270, TYPE_EMULATED_CCW_3270) +OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)struct EmulatedCcw3270Device {CcwDevice parent_obj;
include/hw/s390x/s390-virtio-ccw.h +1 -4
@@ -16,10 +16,7 @@#define TYPE_S390_CCW_MACHINE "s390-ccw-machine" -typedef struct S390CcwMachineClass S390CcwMachineClass ; -typedef struct S390CcwMachineState S390CcwMachineState ; -DECLARE_OBJ_CHECKERS (S390CcwMachineState, S390CcwMachineClass, - S390_CCW_MACHINE, TYPE_S390_CCW_MACHINE) +OBJECT_DECLARE_TYPE(S390CcwMachineState, S390CcwMachineClass, S390_CCW_MACHINE)struct S390CcwMachineState {
include/hw/s390x/storage-attributes.h +1 -4
@@ -20,10 +20,7 @@#define TYPE_QEMU_S390_STATTRIB "s390-storage_attributes-qemu"#define TYPE_KVM_S390_STATTRIB "s390-storage_attributes-kvm" -typedef struct S390StAttribClass S390StAttribClass ; -typedef struct S390StAttribState S390StAttribState ; -DECLARE_OBJ_CHECKERS (S390StAttribState, S390StAttribClass, - S390_STATTRIB, TYPE_S390_STATTRIB) +OBJECT_DECLARE_TYPE(S390StAttribState, S390StAttribClass, S390_STATTRIB)struct S390StAttribState {DeviceState parent_obj;
include/hw/s390x/storage-keys.h +1 -4
@@ -17,10 +17,7 @@#include "qom/object.h" #define TYPE_S390_SKEYS "s390-skeys" -typedef struct S390SKeysClass S390SKeysClass ; -typedef struct S390SKeysState S390SKeysState ; -DECLARE_OBJ_CHECKERS (S390SKeysState, S390SKeysClass, - S390_SKEYS, TYPE_S390_SKEYS) +OBJECT_DECLARE_TYPE(S390SKeysState, S390SKeysClass, S390_SKEYS)struct S390SKeysState {DeviceState parent_obj;
include/hw/s390x/tod.h +1 -4
@@ -21,10 +21,7 @@ typedef struct S390TOD { }S390TOD ;#define TYPE_S390_TOD "s390-tod" -typedef struct S390TODClass S390TODClass ; -typedef struct S390TODState S390TODState ; -DECLARE_OBJ_CHECKERS (S390TODState, S390TODClass, - S390_TOD, TYPE_S390_TOD) +OBJECT_DECLARE_TYPE(S390TODState, S390TODClass, S390_TOD)#define TYPE_KVM_S390_TOD TYPE_S390_TOD "-kvm"#define TYPE_QEMU_S390_TOD TYPE_S390_TOD "-qemu"
include/hw/scsi/scsi.h +1 -3
@@ -50,9 +50,7 @@ struct SCSIRequest { };#define TYPE_SCSI_DEVICE "scsi-device" -typedef struct SCSIDeviceClass SCSIDeviceClass ; -DECLARE_OBJ_CHECKERS (SCSIDevice, SCSIDeviceClass, - SCSI_DEVICE, TYPE_SCSI_DEVICE) +OBJECT_DECLARE_TYPE(SCSIDevice, SCSIDeviceClass, SCSI_DEVICE)struct SCSIDeviceClass {DeviceClass parent_class;
include/hw/sd/allwinner-sdhost.h +1 -4
@@ -45,10 +45,7 @@* @{ */ -typedef struct AwSdHostClass AwSdHostClass ; -typedef struct AwSdHostState AwSdHostState ; -DECLARE_OBJ_CHECKERS (AwSdHostState, AwSdHostClass, -AW_SDHOST ,TYPE_AW_SDHOST ) +OBJECT_DECLARE_TYPE (AwSdHostState, AwSdHostClass,AW_SDHOST )/** @} */
include/hw/sd/sd.h +1 -4
@@ -89,12 +89,9 @@ typedef struct {uint8_t crc; } SDRequest; -typedef struct SDState SDState ;#define TYPE_SD_CARD "sd-card" -typedef struct SDCardClass SDCardClass ; -DECLARE_OBJ_CHECKERS (SDState, SDCardClass, - SD_CARD, TYPE_SD_CARD) +OBJECT_DECLARE_TYPE(SDState, SDCardClass, SD_CARD)struct SDCardClass {/*< private >*/
include/hw/ssi/aspeed_smc.h +1 -4
@@ -68,10 +68,7 @@ typedef struct AspeedSMCFlash { } AspeedSMCFlash;#define TYPE_ASPEED_SMC "aspeed.smc" -typedef struct AspeedSMCClass AspeedSMCClass ; -typedef struct AspeedSMCState AspeedSMCState ; -DECLARE_OBJ_CHECKERS (AspeedSMCState, AspeedSMCClass, - ASPEED_SMC, TYPE_ASPEED_SMC) +OBJECT_DECLARE_TYPE(AspeedSMCState, AspeedSMCClass, ASPEED_SMC)struct AspeedSMCClass {SysBusDevice parent_obj;
include/hw/ssi/xilinx_spips.h +1 -3
@@ -130,14 +130,12 @@ struct XilinxSPIPSClass {uint32_t rx_fifo_size;uint32_t tx_fifo_size; }; -typedef struct XilinxSPIPSClass XilinxSPIPSClass ;#define TYPE_XILINX_SPIPS "xlnx.ps7-spi"#define TYPE_XILINX_QSPIPS "xlnx.ps7-qspi"#define TYPE_XLNX_ZYNQMP_QSPIPS "xlnx.usmp-gqspi" -DECLARE_OBJ_CHECKERS (XilinxSPIPS, XilinxSPIPSClass, - XILINX_SPIPS, TYPE_XILINX_SPIPS) +OBJECT_DECLARE_TYPE(XilinxSPIPS, XilinxSPIPSClass, XILINX_SPIPS)DECLARE_INSTANCE_CHECKER (XilinxQSPIPS,XILINX_QSPIPS ,TYPE_XILINX_QSPIPS )
include/hw/timer/aspeed_timer.h +1 -4
@@ -27,10 +27,7 @@#include "qom/object.h" #define TYPE_ASPEED_TIMER "aspeed.timer" -typedef struct AspeedTimerClass AspeedTimerClass ; -typedef struct AspeedTimerCtrlState AspeedTimerCtrlState ; -DECLARE_OBJ_CHECKERS (AspeedTimerCtrlState, AspeedTimerClass, - ASPEED_TIMER, TYPE_ASPEED_TIMER) +OBJECT_DECLARE_TYPE(AspeedTimerCtrlState, AspeedTimerClass, ASPEED_TIMER)#define TYPE_ASPEED_2400_TIMER TYPE_ASPEED_TIMER "-ast2400"#define TYPE_ASPEED_2500_TIMER TYPE_ASPEED_TIMER "-ast2500"#define TYPE_ASPEED_2600_TIMER TYPE_ASPEED_TIMER "-ast2600"
include/hw/timer/i8254.h +1 -4
@@ -40,10 +40,7 @@ typedef struct PITChannelInfo { } PITChannelInfo;#define TYPE_PIT_COMMON "pit-common" -typedef struct PITCommonState PITCommonState ; -typedef struct PITCommonClass PITCommonClass ; -DECLARE_OBJ_CHECKERS (PITCommonState, PITCommonClass, - PIT_COMMON, TYPE_PIT_COMMON) +OBJECT_DECLARE_TYPE(PITCommonState, PITCommonClass, PIT_COMMON)#define TYPE_I8254 "isa-pit"#define TYPE_KVM_I8254 "kvm-pit"
include/hw/usb.h +1 -3
@@ -265,9 +265,7 @@ struct USBDevice { };#define TYPE_USB_DEVICE "usb-device" -typedef struct USBDeviceClass USBDeviceClass ; -DECLARE_OBJ_CHECKERS (USBDevice, USBDeviceClass, - USB_DEVICE, TYPE_USB_DEVICE) +OBJECT_DECLARE_TYPE(USBDevice, USBDeviceClass, USB_DEVICE)typedef void (*USBDeviceRealize )(USBDevice *dev,Error **errp);typedef void (*USBDeviceUnrealize )(USBDevice *dev);
include/hw/virtio/virtio.h +1 -3
@@ -68,9 +68,7 @@ typedef struct VirtQueueElement#define VIRTIO_NO_VECTOR 0xffff#define TYPE_VIRTIO_DEVICE "virtio-device" -typedef struct VirtioDeviceClass VirtioDeviceClass ; -DECLARE_OBJ_CHECKERS (VirtIODevice, VirtioDeviceClass, - VIRTIO_DEVICE, TYPE_VIRTIO_DEVICE) +OBJECT_DECLARE_TYPE(VirtIODevice, VirtioDeviceClass, VIRTIO_DEVICE)enum virtio_device_endian {VIRTIO_DEVICE_ENDIAN_UNKNOWN ,
include/hw/watchdog/wdt_aspeed.h +1 -4
@@ -15,10 +15,7 @@#include "qom/object.h" #define TYPE_ASPEED_WDT "aspeed.wdt" -typedef struct AspeedWDTClass AspeedWDTClass ; -typedef struct AspeedWDTState AspeedWDTState ; -DECLARE_OBJ_CHECKERS (AspeedWDTState, AspeedWDTClass, - ASPEED_WDT, TYPE_ASPEED_WDT) +OBJECT_DECLARE_TYPE(AspeedWDTState, AspeedWDTClass, ASPEED_WDT)#define TYPE_ASPEED_2400_WDT TYPE_ASPEED_WDT "-ast2400"#define TYPE_ASPEED_2500_WDT TYPE_ASPEED_WDT "-ast2500"#define TYPE_ASPEED_2600_WDT TYPE_ASPEED_WDT "-ast2600"
include/hw/xen/xen-block.h +1 -3
@@ -68,11 +68,9 @@ struct XenBlockDeviceClass {XenBlockDeviceRealize realize;XenBlockDeviceUnrealize unrealize; }; -typedef struct XenBlockDeviceClass XenBlockDeviceClass ;#define TYPE_XEN_BLOCK_DEVICE "xen-block" -DECLARE_OBJ_CHECKERS (XenBlockDevice, XenBlockDeviceClass, - XEN_BLOCK_DEVICE, TYPE_XEN_BLOCK_DEVICE) +OBJECT_DECLARE_TYPE(XenBlockDevice, XenBlockDeviceClass, XEN_BLOCK_DEVICE)struct XenDiskDevice {XenBlockDevice blockdev;
include/hw/xen/xen-bus.h +1 -3
@@ -57,11 +57,9 @@ struct XenDeviceClass {XenDeviceFrontendChanged frontend_changed;XenDeviceUnrealize unrealize; }; -typedef struct XenDeviceClass XenDeviceClass ;#define TYPE_XEN_DEVICE "xen-device" -DECLARE_OBJ_CHECKERS (XenDevice, XenDeviceClass, - XEN_DEVICE, TYPE_XEN_DEVICE) +OBJECT_DECLARE_TYPE(XenDevice, XenDeviceClass, XEN_DEVICE)struct XenBus {BusState qbus;
include/net/can_host.h +1 -4
@@ -32,10 +32,7 @@#include "qom/object.h" #define TYPE_CAN_HOST "can-host" -typedef struct CanHostClass CanHostClass ; -typedef struct CanHostState CanHostState ; -DECLARE_OBJ_CHECKERS (CanHostState, CanHostClass, - CAN_HOST, TYPE_CAN_HOST) +OBJECT_DECLARE_TYPE(CanHostState, CanHostClass, CAN_HOST)struct CanHostState {ObjectClass oc;
include/net/filter.h +1 -3
@@ -15,9 +15,7 @@#include "net/queue.h" #define TYPE_NETFILTER "netfilter" -typedef struct NetFilterClass NetFilterClass ; -DECLARE_OBJ_CHECKERS (NetFilterState, NetFilterClass, - NETFILTER, TYPE_NETFILTER) +OBJECT_DECLARE_TYPE(NetFilterState, NetFilterClass, NETFILTER)typedef void (FilterSetup ) (NetFilterState *nf,Error **errp);typedef void (FilterCleanup ) (NetFilterState *nf);
include/ui/console.h +1 -3
@@ -106,9 +106,7 @@ void kbd_put_keysym(int keysym);/* consoles */ #define TYPE_QEMU_CONSOLE "qemu-console" -typedef struct QemuConsoleClass QemuConsoleClass ; -DECLARE_OBJ_CHECKERS (QemuConsole, QemuConsoleClass, - QEMU_CONSOLE, TYPE_QEMU_CONSOLE) +OBJECT_DECLARE_TYPE(QemuConsole, QemuConsoleClass, QEMU_CONSOLE)struct QemuConsoleClass {
hw/arm/mps2-tz.c +1 -4
@@ -77,7 +77,6 @@ struct MPS2TZMachineClass {uint32_t scc_id;const char *armsse_type; }; -typedef struct MPS2TZMachineClass MPS2TZMachineClass ;struct MPS2TZMachineState {MachineState parent;
@@ -102,14 +101,12 @@ struct MPS2TZMachineState {DeviceState *lan9118;SplitIRQ cpu_irq_splitter[MPS2TZ_NUMIRQ ]; }; -typedef struct MPS2TZMachineState MPS2TZMachineState ;#define TYPE_MPS2TZ_MACHINE "mps2tz"#define TYPE_MPS2TZ_AN505_MACHINE MACHINE_TYPE_NAME("mps2-an505")#define TYPE_MPS2TZ_AN521_MACHINE MACHINE_TYPE_NAME("mps2-an521") -DECLARE_OBJ_CHECKERS (MPS2TZMachineState, MPS2TZMachineClass, -MPS2TZ_MACHINE ,TYPE_MPS2TZ_MACHINE ) +OBJECT_DECLARE_TYPE (MPS2TZMachineState, MPS2TZMachineClass,MPS2TZ_MACHINE ) /* Main SYSCLK frequency in Hz */#define SYSCLK_FRQ 20000000
hw/arm/mps2.c +1 -4
@@ -63,7 +63,6 @@ struct MPS2MachineClass {hwaddr ethernet_base;hwaddr psram_base; }; -typedef struct MPS2MachineClass MPS2MachineClass ;struct MPS2MachineState {MachineState parent;
@@ -85,7 +84,6 @@ struct MPS2MachineState {CMSDKAPBDualTimer dualtimer;CMSDKAPBWatchdog watchdog; }; -typedef struct MPS2MachineState MPS2MachineState ;#define TYPE_MPS2_MACHINE "mps2"#define TYPE_MPS2_AN385_MACHINE MACHINE_TYPE_NAME("mps2-an385")
@@ -93,8 +91,7 @@ typedef struct MPS2MachineState MPS2MachineState;#define TYPE_MPS2_AN500_MACHINE MACHINE_TYPE_NAME("mps2-an500")#define TYPE_MPS2_AN511_MACHINE MACHINE_TYPE_NAME("mps2-an511") -DECLARE_OBJ_CHECKERS (MPS2MachineState, MPS2MachineClass, -MPS2_MACHINE ,TYPE_MPS2_MACHINE ) +OBJECT_DECLARE_TYPE (MPS2MachineState, MPS2MachineClass,MPS2_MACHINE ) /* Main SYSCLK frequency in Hz */#define SYSCLK_FRQ 25000000
hw/arm/musca.c +1 -4
@@ -55,7 +55,6 @@ struct MuscaMachineClass {const MPCInfo *mpc_info;int num_mpcs; }; -typedef struct MuscaMachineClass MuscaMachineClass ;struct MuscaMachineState {MachineState parent;
@@ -84,14 +83,12 @@ struct MuscaMachineState {UnimplementedDeviceState gpio;UnimplementedDeviceState cryptoisland; }; -typedef struct MuscaMachineState MuscaMachineState ;#define TYPE_MUSCA_MACHINE "musca"#define TYPE_MUSCA_A_MACHINE MACHINE_TYPE_NAME("musca-a")#define TYPE_MUSCA_B1_MACHINE MACHINE_TYPE_NAME("musca-b1") -DECLARE_OBJ_CHECKERS (MuscaMachineState, MuscaMachineClass, -MUSCA_MACHINE ,TYPE_MUSCA_MACHINE ) +OBJECT_DECLARE_TYPE (MuscaMachineState, MuscaMachineClass,MUSCA_MACHINE )/* * Main SYSCLK frequency in Hz
hw/arm/spitz.c +1 -4
@@ -43,7 +43,6 @@ struct SpitzMachineClass {enum spitz_model_e model;int arm_id; }; -typedef struct SpitzMachineClass SpitzMachineClass ;struct SpitzMachineState {MachineState parent;
@@ -56,11 +55,9 @@ struct SpitzMachineState {DeviceState *scp1;DeviceState *misc_gpio; }; -typedef struct SpitzMachineState SpitzMachineState ;#define TYPE_SPITZ_MACHINE "spitz-common" -DECLARE_OBJ_CHECKERS (SpitzMachineState, SpitzMachineClass, - SPITZ_MACHINE, TYPE_SPITZ_MACHINE) +OBJECT_DECLARE_TYPE(SpitzMachineState, SpitzMachineClass, SPITZ_MACHINE)#define zaurus_printf (format, ...) \ fprintf(stderr, "%s: " format, __func__, ##__VA_ARGS__)
hw/arm/vexpress.c +1 -4
@@ -171,20 +171,17 @@ struct VexpressMachineClass {MachineClass parent;VEDBoardInfo *daughterboard; }; -typedef struct VexpressMachineClass VexpressMachineClass ;struct VexpressMachineState {MachineState parent;bool secure;bool virt; }; -typedef struct VexpressMachineState VexpressMachineState ;#define TYPE_VEXPRESS_MACHINE "vexpress"#define TYPE_VEXPRESS_A9_MACHINE MACHINE_TYPE_NAME("vexpress-a9")#define TYPE_VEXPRESS_A15_MACHINE MACHINE_TYPE_NAME("vexpress-a15") -DECLARE_OBJ_CHECKERS (VexpressMachineState, VexpressMachineClass, - VEXPRESS_MACHINE, TYPE_VEXPRESS_MACHINE) +OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE) typedef void DBoardInitFn(const VexpressMachineState *machine, ram_addr_t ram_size,
hw/block/m25p80.c +1 -4
@@ -456,17 +456,14 @@ struct Flash {const FlashPartInfo *pi; }; -typedef struct Flash Flash ;struct M25P80Class {SSISlaveClass parent_class;FlashPartInfo *pi; }; -typedef struct M25P80Class M25P80Class ;#define TYPE_M25P80 "m25p80-generic" -DECLARE_OBJ_CHECKERS (Flash, M25P80Class, - M25P80, TYPE_M25P80) +OBJECT_DECLARE_TYPE(Flash, M25P80Class, M25P80)static inline Manufacturer get_man (Flash *s) {
hw/input/adb-kbd.c +1 -4
@@ -32,10 +32,7 @@#include "trace.h" #include "qom/object.h" -typedef struct ADBKeyboardClass ADBKeyboardClass ; -typedef struct KBDState KBDState ; -DECLARE_OBJ_CHECKERS (KBDState, ADBKeyboardClass, - ADB_KEYBOARD, TYPE_ADB_KEYBOARD) +OBJECT_DECLARE_TYPE(KBDState, ADBKeyboardClass, ADB_KEYBOARD)struct KBDState {/*< private >*/
hw/input/adb-mouse.c +1 -4
@@ -31,10 +31,7 @@#include "trace.h" #include "qom/object.h" -typedef struct ADBMouseClass ADBMouseClass ; -typedef struct MouseState MouseState ; -DECLARE_OBJ_CHECKERS (MouseState, ADBMouseClass, - ADB_MOUSE, TYPE_ADB_MOUSE) +OBJECT_DECLARE_TYPE(MouseState, ADBMouseClass, ADB_MOUSE)struct MouseState {/*< public >*/
hw/misc/tmp421.c +1 -4
@@ -65,17 +65,14 @@ struct TMP421State {uint8_t pointer; }; -typedef struct TMP421State TMP421State ;struct TMP421Class {I2CSlaveClass parent_class;DeviceInfo *dev; }; -typedef struct TMP421Class TMP421Class ;#define TYPE_TMP421 "tmp421-generic" -DECLARE_OBJ_CHECKERS (TMP421State, TMP421Class, -TMP421 ,TYPE_TMP421 ) +OBJECT_DECLARE_TYPE (TMP421State, TMP421Class,TMP421 )/* the TMP421 registers */
hw/scsi/scsi-disk.c +1 -4
@@ -55,10 +55,7 @@#define TYPE_SCSI_DISK_BASE "scsi-disk-base" -typedef struct SCSIDiskClass SCSIDiskClass ; -typedef struct SCSIDiskState SCSIDiskState ; -DECLARE_OBJ_CHECKERS (SCSIDiskState, SCSIDiskClass, - SCSI_DISK_BASE, TYPE_SCSI_DISK_BASE) +OBJECT_DECLARE_TYPE(SCSIDiskState, SCSIDiskClass, SCSI_DISK_BASE)struct SCSIDiskClass {SCSIDeviceClass parent_class;
hw/scsi/vmw_pvscsi.c +1 -4
@@ -61,12 +61,9 @@ struct PVSCSIClass {PCIDeviceClass parent_class;DeviceRealize parent_dc_realize; }; -typedef struct PVSCSIClass PVSCSIClass ;#define TYPE_PVSCSI "pvscsi" -typedef struct PVSCSIState PVSCSIState ; -DECLARE_OBJ_CHECKERS (PVSCSIState, PVSCSIClass, -PVSCSI ,TYPE_PVSCSI ) +OBJECT_DECLARE_TYPE (PVSCSIState, PVSCSIClass,PVSCSI )/* Compatibility flags for migration */
Signature · 1 line
2.26.2
[PULL 13/17] scripts/codeconverter: Update to latest version
In reply to Eduardo HabkostI'm not documenting every single change in the codeconverter script because most of that code will be deleted once we finish the QOM code conversion. This patch updates the script to the latest version that was used to perform changes in the QOM code.
Message-Id: <[email protected]>
--- .../codeconverter/codeconverter/patching.py | 193 +++-- .../codeconverter/codeconverter/qom_macros.py | 327 ++++++-- .../codeconverter/qom_type_info.py | 741 +++++++++++++++--- .../codeconverter/test_patching.py | 3 +- .../codeconverter/test_regexps.py | 26 +- scripts/codeconverter/converter.py | 12 +- 6 files changed, 1057 insertions(+), 245 deletions(-)
scripts/codeconverter/codeconverter/patching.py +131 -62
@@ -5,7 +5,7 @@ # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. -from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple +from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union from pathlib import Path from itertools import chain from tempfile import NamedTemporaryFile
@@ -47,7 +47,7 @@ class FileMatch: def __init__(self, f: 'FileInfo', m: Match) -> None: self.file: 'FileInfo' = f - self.match: Match = m + self.match: Match[str] = m @property def name(self) -> str:
@@ -68,8 +68,13 @@ class FileMatch: def line_col(self) -> LineAndColumn: return self.file.line_col(self.start()) - def group(self, *args): - return self.match.group(*args) + def group(self, group: Union[int, str]) -> str: + return self.match.group(group) + + def getgroup(self, group: str) -> Optional[str]: + if group not in self.match.groupdict(): + return None + return self.match.group(group) def log(self, level, fmt, *args) -> None: pos = self.line_col()
@@ -163,18 +168,51 @@ class FileMatch: raise NotImplementedError() @classmethod - def find_matches(klass, content: str) -> Iterable[Match]: - """Generate match objects for class + def finditer(klass, content: str, pos=0, endpos=-1) -> Iterable[Match]: + """Helper for re.finditer()""" + if endpos >= 0: + content = content[:endpos] + return klass.compiled_re().finditer(content, pos) - Might be reimplemented by subclasses if they - intend to look for matches using a different method. - """ - return klass.compiled_re().finditer(content) + @classmethod + def domatch(klass, content: str, pos=0, endpos=-1) -> Optional[Match]: + """Helper for re.match()""" + if endpos >= 0: + content = content[:endpos] + return klass.compiled_re().match(content, pos) + + def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']: + assert self.file.original_content + return (klass(self.file, m) + for m in klass.finditer(self.file.original_content, + self.match.start(group), + self.match.end(group))) + + def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']: + assert self.file.original_content + m = klass.domatch(self.file.original_content, + self.match.start(group), + self.match.end(group)) + if not m: + return None + else: + return klass(self.file, m) + + def group_match(self, group: Union[str, int]) -> 'FileMatch': + m = self.try_group_match(FullMatch, group) + assert m + return m @property def allfiles(self) -> 'FileList': return self.file.allfiles +class FullMatch(FileMatch): + """Regexp that will match all contents of string + Useful when used with group_match() + """ + regexp = r'(?s).*' # (?s) is re.DOTALL + def all_subclasses(c: Type[FileMatch]) -> Iterable[Type[FileMatch]]: for sc in c.__subclasses__(): yield sc
@@ -201,7 +239,15 @@ def apply_patches(s: str, patches: Iterable[Patch]) -> str: """ r = StringIO() last = 0 - for p in sorted(patches): + def patch_sort_key(item: Tuple[int, Patch]) -> Tuple[int, int, int]: + """Patches are sorted by byte position, + patches at the same byte position are applied in the order + they were generated. + """ + i,p = item + return (p.start, p.end, i) + + for i,p in sorted(enumerate(patches), key=patch_sort_key): DBG("Applying patch at position %d (%s) - %d (%s): %r", p.start, line_col(s, p.start), p.end, line_col(s, p.end),
@@ -220,26 +266,35 @@ class RegexpScanner: self.match_index: Dict[Type[Any], List[FileMatch]] = {} self.match_name_index: Dict[Tuple[Type[Any], str, str], Optional[FileMatch]] = {} - def _find_matches(self, klass: Type[Any]) -> Iterable[FileMatch]: + def _matches_of_type(self, klass: Type[Any]) -> Iterable[FileMatch]: raise NotImplementedError() def matches_of_type(self, t: Type[T]) -> List[T]: if t not in self.match_index: - self.match_index[t] = list(self._find_matches(t)) - return self.match_index[t] # type: ignore + self.match_index[t] = list(self._matches_of_type(t)) + return self.match_index[t] # type: ignore - def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]: + def find_matches(self, t: Type[T], name: str, group: str='name') -> List[T]: indexkey = (t, name, group) if indexkey in self.match_name_index: return self.match_name_index[indexkey] # type: ignore - r: Optional[T] = None + r: List[T] = [] for m in self.matches_of_type(t): assert isinstance(m, FileMatch) - if m.group(group) == name: - r = m # type: ignore + if m.getgroup(group) == name: + r.append(m) # type: ignore self.match_name_index[indexkey] = r # type: ignore return r + def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]: + l = self.find_matches(t, name, group) + if not l: + return None + if len(l) > 1: + logger.warn("multiple matches found for %r (%s=%r)", t, group, name) + return None + return l[0] + def reset_index(self) -> None: self.match_index.clear() self.match_name_index.clear()
@@ -258,18 +313,22 @@ class FileInfo(RegexpScanner): def __repr__(self) -> str: return f'<FileInfo {repr(self.filename)}>' + def filename_matches(self, name: str) -> bool: + nameparts = Path(name).parts + return self.filename.parts[-len(nameparts):] == nameparts + def line_col(self, start: int) -> LineAndColumn: """Return line and column for a match object inside original_content""" return line_col(self.original_content, start) - def _find_matches(self, klass: Type[Any]) -> List[FileMatch]: + def _matches_of_type(self, klass: Type[Any]) -> List[FileMatch]: """Build FileMatch objects for each match of regexp""" if not hasattr(klass, 'regexp') or klass.regexp is None: return [] assert hasattr(klass, 'regexp') DBG("%s: scanning for %s", self.filename, klass.__name__) DBG("regexp: %s", klass.regexp) - matches = [klass(self, m) for m in klass.find_matches(self.original_content)] + matches = [klass(self, m) for m in klass.finditer(self.original_content)] DBG('%s: %d matches found for %s: %s', self.filename, len(matches), klass.__name__,' '.join(names(matches))) return matches
@@ -277,7 +336,7 @@ class FileInfo(RegexpScanner): def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]: for m in self.matches_of_type(t): assert isinstance(m, FileMatch) - if m.group(group) == name: + if m.getgroup(group) == name: return m # type: ignore return None
@@ -299,7 +358,16 @@ class FileInfo(RegexpScanner): return (m for l in lists for m in l) - def scan_for_matches(self, class_names: Optional[List[str]]=None) -> None: + def gen_patches(self, matches: List[FileMatch]) -> None: + for m in matches: + DBG("Generating patches for %r", m) + for i,p in enumerate(m.gen_patches()): + DBG("patch %d generated by %r:", i, m) + DBG("replace contents at %s-%s with %r", + self.line_col(p.start), self.line_col(p.end), p.replacement) + self.patches.append(p) + + def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]: DBG("class names: %r", class_names) class_dict = match_class_dict() if class_names is None:
@@ -309,40 +377,9 @@ class FileInfo(RegexpScanner): DBG("class_names: %r", class_names) for cn in class_names: matches = self.matches_of_type(class_dict[cn]) - if len(matches) > 0: - DBG('%s: %d matches found for %s: %s', self.filename, - len(matches), cn, ' '.join(names(matches))) - - def gen_patches(self) -> None: - for m in self.all_matches: - for i,p in enumerate(m.gen_patches()): - DBG("patch %d generated by %r:", i, m) - DBG("replace contents at %s-%s with %r", - self.line_col(p.start), self.line_col(p.end), p.replacement) - self.patches.append(p) - - def patch_content(self, max_passes=0, class_names: Optional[List[str]]=None) -> None: - """Multi-pass content patching loop - - We run multiple passes because there are rules that will - delete init functions once they become empty. - """ - passes = 0 - total_patches = 0 - DBG("max_passes: %r", max_passes) - while not max_passes or max_passes <= 0 or passes < max_passes: - passes += 1 - self.scan_for_matches(class_names) - self.gen_patches() - DBG("patch content: pass %d: %d patches generated", passes, len(self.patches)) - total_patches += len(self.patches) - if not self.patches: - break - try: - self.apply_patches() - except PatchingError: - logger.exception("%s: failed to patch file", self.filename) - DBG("%s: %d patches applied total in %d passes", self.filename, total_patches, passes) + DBG('%d matches found for %s: %s', + len(matches), cn, ' '.join(names(matches))) + yield from matches def apply_patches(self) -> None: """Replace self.original_content after applying patches from self.patches"""
@@ -384,14 +421,46 @@ class FileList(RegexpScanner): def __iter__(self): return iter(self.files) - def _find_matches(self, klass: Type[Any]) -> Iterable[FileMatch]: - return chain(*(f._find_matches(klass) for f in self.files)) + def _matches_of_type(self, klass: Type[Any]) -> Iterable[FileMatch]: + return chain(*(f._matches_of_type(klass) for f in self.files)) - def find_file(self, name) -> Optional[FileInfo]: + def find_file(self, name: str) -> Optional[FileInfo]: """Get file with path ending with @name""" - nameparts = Path(name).parts for f in self.files: - if f.filename.parts[:len(nameparts)] == nameparts: + if f.filename_matches(name): return f else: - return None + return None + + def one_pass(self, class_names: List[str]) -> int: + total_patches = 0 + for f in self.files: + INFO("Scanning file %s", f.filename) + matches = list(f.scan_for_matches(class_names)) + INFO("Generating patches for file %s", f.filename) + f.gen_patches(matches) + total_patches += len(f.patches) + if total_patches: + for f in self.files: + try: + f.apply_patches() + except PatchingError: + logger.exception("%s: failed to patch file", f.filename) + return total_patches + + def patch_content(self, max_passes, class_names: List[str]) -> None: + """Multi-pass content patching loop + + We run multiple passes because there are rules that will + delete init functions once they become empty. + """ + passes = 0 + total_patches = 0 + DBG("max_passes: %r", max_passes) + while not max_passes or max_passes <= 0 or passes < max_passes: + passes += 1 + INFO("Running pass: %d", passes) + count = self.one_pass(class_names) + DBG("patch content: pass %d: %d patches generated", passes, count) + total_patches += count + DBG("%d patches applied total in %d passes", total_patches, passes)
scripts/codeconverter/codeconverter/qom_macros.py +268 -59
415 lines not on this page · raw message
scripts/codeconverter/codeconverter/qom_type_info.py +638 -103
873 lines not on this page · raw message
scripts/codeconverter/codeconverter/test_patching.py +1 -2
@@ -31,7 +31,6 @@ def test_pattern_patching(): files = FileList() f = FileInfo(files, of.name) f.load() - f.scan_for_matches() matches = f.matches_of_type(BasicPattern) assert len(matches) == 2 p2 = matches[1]
@@ -40,7 +39,7 @@ def test_pattern_patching(): f.patches.append(p2.append('XXX')) # apply all patches: - f.gen_patches() + f.gen_patches(matches) patched = f.get_patched_content() assert patched == ('one line\n'+ 'this pattern will be patched: defBBBBBhij\n'+
scripts/codeconverter/codeconverter/test_regexps.py +13 -13
@@ -9,7 +9,7 @@ from .regexps import * from .qom_macros import * from .qom_type_info import * -def test_res(): +def test_res() -> None: def fullmatch(regexp, s): return re.fullmatch(regexp, s, re.MULTILINE)
@@ -113,10 +113,10 @@ static const TypeInfo char_file_type_info = { * need to set up reset or vmstate, and has no realize method. */''') - print(RE_TYPEINFO_DEF) + print(TypeInfoVar.regexp) test_empty = 'static const TypeInfo x86_base_cpu_type_info = {\n'+\ '};\n'; - assert fullmatch(RE_TYPEINFO_DEF, test_empty) + assert fullmatch(TypeInfoVar.regexp, test_empty) test_simple = r''' static const TypeInfo x86_base_cpu_type_info = {
@@ -125,7 +125,7 @@ static const TypeInfo char_file_type_info = { .class_init = x86_cpu_base_class_init, }; ''' - assert re.search(RE_TYPEINFO_DEF, test_simple, re.MULTILINE) + assert re.search(TypeInfoVar.regexp, test_simple, re.MULTILINE) test_interfaces = r''' static const TypeInfo acpi_ged_info = {
@@ -141,7 +141,7 @@ static const TypeInfo char_file_type_info = { } }; ''' - assert re.search(RE_TYPEINFO_DEF, test_interfaces, re.MULTILINE) + assert re.search(TypeInfoVar.regexp, test_interfaces, re.MULTILINE) test_comments = r''' static const TypeInfo palm_misc_gpio_info = {
@@ -155,7 +155,7 @@ static const TypeInfo char_file_type_info = { */ }; ''' - assert re.search(RE_TYPEINFO_DEF, test_comments, re.MULTILINE) + assert re.search(TypeInfoVar.regexp, test_comments, re.MULTILINE) test_comments = r''' static const TypeInfo tpm_crb_info = {
@@ -170,7 +170,7 @@ static const TypeInfo char_file_type_info = { } }; ''' - assert re.search(RE_TYPEINFO_DEF, test_comments, re.MULTILINE) + assert re.search(TypeInfoVar.regexp, test_comments, re.MULTILINE) def test_struct_re(): print('---')
@@ -232,8 +232,8 @@ def test_initial_includes(): /* pflash_cfi01.c */ ''' - print(repr(list(m.groupdict() for m in re.finditer(InitialIncludes.regexp, c, re.MULTILINE)))) - m = re.match(InitialIncludes.regexp, c, re.MULTILINE) + print(repr(list(m.groupdict() for m in InitialIncludes.finditer(c)))) + m = InitialIncludes.domatch(c) assert m print(repr(m.group(0))) assert m.group(0).endswith('#include "exec/hwaddr.h"\n')
@@ -247,8 +247,8 @@ def test_initial_includes(): ''' - print(repr(list(m.groupdict() for m in re.finditer(InitialIncludes.regexp, c, re.MULTILINE)))) - m = re.match(InitialIncludes.regexp, c, re.MULTILINE) + print(repr(list(m.groupdict() for m in InitialIncludes.finditer(c)))) + m = InitialIncludes.domatch(c) assert m print(repr(m.group(0))) assert m.group(0).endswith('#include "9p.h"\n')
@@ -274,8 +274,8 @@ def test_initial_includes(): /* Missing stuff: SCTRL_P[12](END|ST)INC ''' - print(repr(list(m.groupdict() for m in re.finditer(InitialIncludes.regexp, c, re.MULTILINE)))) - m = re.match(InitialIncludes.regexp, c, re.MULTILINE) + print(repr(list(m.groupdict() for m in InitialIncludes.finditer(c)))) + m = InitialIncludes.domatch(c) assert m print(repr(m.group(0))) assert m.group(0).endswith('#include "sysemu/dma.h"\n')
scripts/codeconverter/converter.py +6 -6
@@ -42,7 +42,7 @@ def process_all_files(parser: argparse.ArgumentParser, args: argparse.Namespace) for t in f.matches_of_type(TypeInfoVar): assert isinstance(t, TypeInfoVar) values = [f.filename, t.name] + \ - [t.get_initializer_value(f).raw + [t.get_raw_initializer_value(f) for f in TI_FIELDS] DBG('values: %r', values) assert all('\t' not in v for v in values)
@@ -55,18 +55,18 @@ def process_all_files(parser: argparse.ArgumentParser, args: argparse.Namespace) parser.error("--pattern is required") classes = [p for arg in args.patterns - for p in re.split(r'[\s,]', arg)] + for p in re.split(r'[\s,]', arg) + if p.strip()] for c in classes: - if c not in match_classes: + if c not in match_classes \ + or not match_classes[c].regexp: print("Invalid pattern name: %s" % (c), file=sys.stderr) print("Valid patterns:", file=sys.stderr) print(PATTERN_HELP, file=sys.stderr) sys.exit(1) DBG("classes: %r", classes) - for f in files: - DBG("patching contents of %s", f.filename) - f.patch_content(max_passes=args.passes, class_names=classes) + files.patch_content(max_passes=args.passes, class_names=classes) for f in files: #alltypes.extend(f.type_infos)
Signature · 1 line
2.26.2
[PULL 17/17] Use OBJECT_DECLARE_SIMPLE_TYPE when possible
In reply to Eduardo HabkostThis converts existing DECLARE_INSTANCE_CHECKER usage to OBJECT_DECLARE_SIMPLE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')
Message-Id: <[email protected]>
--- hw/9pfs/virtio-9p.h | 4 +- hw/audio/intel-hda.h | 4 +- hw/display/ati_int.h | 4 +- hw/display/qxl.h | 4 +- hw/i386/amd_iommu.h | 4 +- hw/misc/tmp105.h | 4 +- hw/net/fsl_etsec/etsec.h | 3 +- hw/net/tulip.h | 4 +- hw/ppc/e500-ccsr.h | 4 +- hw/ppc/mac.h | 4 +- hw/s390x/ipl.h | 4 +- hw/s390x/s390-pci-bus.h | 16 ++------ hw/s390x/virtio-ccw.h | 52 ++++++------------------ hw/usb/hcd-ehci.h | 8 +--- hw/usb/hcd-ohci.h | 4 +- hw/usb/hcd-xhci.h | 4 +- hw/vfio/pci.h | 4 +- hw/xen/xen_pt.h | 4 +- include/block/throttle-groups.h | 4 +- include/hw/acpi/generic_event_device.h | 4 +- include/hw/acpi/vmgenid.h | 4 +- include/hw/adc/stm32f2xx_adc.h | 4 +- include/hw/arm/allwinner-a10.h | 4 +- include/hw/arm/allwinner-h3.h | 4 +- include/hw/arm/armv7m.h | 8 +--- include/hw/arm/bcm2835_peripherals.h | 4 +- include/hw/arm/digic.h | 4 +- include/hw/arm/exynos4210.h | 4 +- include/hw/arm/fsl-imx25.h | 4 +- include/hw/arm/fsl-imx31.h | 4 +- include/hw/arm/fsl-imx6.h | 4 +- include/hw/arm/fsl-imx6ul.h | 4 +- include/hw/arm/fsl-imx7.h | 4 +- include/hw/arm/msf2-soc.h | 4 +- include/hw/arm/nrf51_soc.h | 4 +- include/hw/arm/omap.h | 4 +- include/hw/arm/pxa.h | 15 ++----- include/hw/arm/stm32f205_soc.h | 4 +- include/hw/arm/stm32f405_soc.h | 4 +- include/hw/arm/xlnx-versal.h | 4 +- include/hw/arm/xlnx-zynqmp.h | 4 +- include/hw/block/flash.h | 8 +--- include/hw/block/swim.h | 12 ++---- include/hw/char/avr_usart.h | 4 +- include/hw/char/bcm2835_aux.h | 4 +- include/hw/char/cadence_uart.h | 4 +- include/hw/char/cmsdk-apb-uart.h | 4 +- include/hw/char/digic-uart.h | 4 +- include/hw/char/escc.h | 4 +- include/hw/char/ibex_uart.h | 4 +- include/hw/char/imx_serial.h | 4 +- include/hw/char/nrf51_uart.h | 4 +- include/hw/char/pl011.h | 4 +- include/hw/char/serial.h | 11 ++--- include/hw/char/stm32f2xx_usart.h | 4 +- include/hw/clock.h | 4 +- include/hw/core/generic-loader.h | 4 +- include/hw/core/split-irq.h | 4 +- include/hw/cpu/a15mpcore.h | 4 +- include/hw/cpu/a9mpcore.h | 4 +- include/hw/cpu/arm11mpcore.h | 4 +- include/hw/cpu/cluster.h | 4 +- include/hw/cpu/core.h | 4 +- include/hw/display/bcm2835_fb.h | 4 +- include/hw/display/dpcd.h | 4 +- include/hw/display/i2c-ddc.h | 4 +- include/hw/display/macfb.h | 4 +- include/hw/display/xlnx_dp.h | 4 +- include/hw/dma/bcm2835_dma.h | 4 +- include/hw/dma/i8257.h | 4 +- include/hw/dma/pl080.h | 4 +- include/hw/dma/xlnx-zdma.h | 4 +- include/hw/dma/xlnx-zynq-devcfg.h | 4 +- include/hw/dma/xlnx_dpdma.h | 4 +- include/hw/gpio/bcm2835_gpio.h | 4 +- include/hw/gpio/imx_gpio.h | 4 +- include/hw/gpio/nrf51_gpio.h | 4 +- include/hw/hyperv/vmbus-bridge.h | 4 +- include/hw/hyperv/vmbus.h | 4 +- include/hw/i2c/i2c.h | 3 +- include/hw/i2c/imx_i2c.h | 4 +- include/hw/i2c/microbit_i2c.h | 4 +- include/hw/i2c/ppc4xx_i2c.h | 4 +- include/hw/i386/ich9.h | 4 +- include/hw/i386/intel_iommu.h | 4 +- include/hw/ide/ahci.h | 12 ++---- include/hw/ide/internal.h | 4 +- include/hw/ide/pci.h | 4 +- include/hw/input/adb.h | 4 +- include/hw/input/i8042.h | 4 +- include/hw/intc/allwinner-a10-pic.h | 4 +- include/hw/intc/aspeed_vic.h | 4 +- include/hw/intc/bcm2835_ic.h | 4 +- include/hw/intc/bcm2836_control.h | 4 +- include/hw/intc/heathrow_pic.h | 4 +- include/hw/intc/ibex_plic.h | 4 +- include/hw/intc/imx_avic.h | 4 +- include/hw/intc/imx_gpcv2.h | 4 +- include/hw/intc/mips_gic.h | 4 +- include/hw/intc/realview_gic.h | 4 +- include/hw/intc/rx_icu.h | 4 +- include/hw/intc/xlnx-pmu-iomod-intc.h | 4 +- include/hw/intc/xlnx-zynqmp-ipi.h | 4 +- include/hw/ipack/ipack.h | 4 +- include/hw/ipmi/ipmi.h | 4 +- include/hw/isa/isa.h | 3 +- include/hw/isa/pc87312.h | 4 +- include/hw/m68k/mcf_fec.h | 4 +- include/hw/mips/cps.h | 4 +- include/hw/misc/a9scu.h | 4 +- include/hw/misc/allwinner-cpucfg.h | 4 +- include/hw/misc/allwinner-h3-ccu.h | 4 +- include/hw/misc/allwinner-h3-dramc.h | 4 +- include/hw/misc/allwinner-h3-sysctrl.h | 4 +- include/hw/misc/allwinner-sid.h | 4 +- include/hw/misc/arm11scu.h | 4 +- include/hw/misc/armsse-cpuid.h | 4 +- include/hw/misc/armsse-mhu.h | 4 +- include/hw/misc/aspeed_xdma.h | 4 +- include/hw/misc/auxbus.h | 11 ++--- include/hw/misc/avr_power.h | 4 +- include/hw/misc/bcm2835_mbox.h | 4 +- include/hw/misc/bcm2835_mphi.h | 3 +- include/hw/misc/bcm2835_property.h | 4 +- include/hw/misc/bcm2835_rng.h | 4 +- include/hw/misc/bcm2835_thermal.h | 4 +- include/hw/misc/grlib_ahb_apb_pnp.h | 8 +--- include/hw/misc/imx25_ccm.h | 4 +- include/hw/misc/imx31_ccm.h | 4 +- include/hw/misc/imx6_ccm.h | 4 +- include/hw/misc/imx6_src.h | 4 +- include/hw/misc/imx6ul_ccm.h | 4 +- include/hw/misc/imx7_ccm.h | 8 +--- include/hw/misc/imx7_gpr.h | 4 +- include/hw/misc/imx7_snvs.h | 4 +- include/hw/misc/imx_rngc.h | 4 +- include/hw/misc/iotkit-secctl.h | 4 +- include/hw/misc/iotkit-sysctl.h | 4 +- include/hw/misc/iotkit-sysinfo.h | 4 +- include/hw/misc/mac_via.h | 12 ++---- include/hw/misc/macio/cuda.h | 8 +--- include/hw/misc/macio/gpio.h | 4 +- include/hw/misc/macio/macio.h | 20 +++------ include/hw/misc/macio/pmu.h | 8 +--- include/hw/misc/max111x.h | 4 +- include/hw/misc/mips_cmgcr.h | 4 +- include/hw/misc/mips_cpc.h | 4 +- include/hw/misc/mips_itu.h | 4 +- include/hw/misc/mps2-fpgaio.h | 4 +- include/hw/misc/mps2-scc.h | 4 +- include/hw/misc/msf2-sysreg.h | 4 +- include/hw/misc/nrf51_rng.h | 4 +- include/hw/misc/stm32f2xx_syscfg.h | 4 +- include/hw/misc/stm32f4xx_exti.h | 4 +- include/hw/misc/stm32f4xx_syscfg.h | 4 +- include/hw/misc/tz-mpc.h | 4 +- include/hw/misc/tz-msc.h | 4 +- include/hw/misc/tz-ppc.h | 4 +- include/hw/misc/unimp.h | 4 +- include/hw/misc/zynq-xadc.h | 4 +- include/hw/net/allwinner-sun8i-emac.h | 4 +- include/hw/net/allwinner_emac.h | 4 +- include/hw/net/cadence_gem.h | 4 +- include/hw/net/ftgmac100.h | 8 +--- include/hw/net/imx_fec.h | 4 +- include/hw/net/msf2-emac.h | 4 +- include/hw/nubus/mac-nubus-bridge.h | 4 +- include/hw/nubus/nubus.h | 8 +--- include/hw/nvram/fw_cfg.h | 9 ++-- include/hw/nvram/nrf51_nvm.h | 4 +- include/hw/pci-bridge/simba.h | 4 +- include/hw/pci-host/designware.h | 8 +--- include/hw/pci-host/gpex.h | 8 +--- include/hw/pci-host/i440fx.h | 4 +- include/hw/pci-host/pnv_phb3.h | 7 +--- include/hw/pci-host/pnv_phb4.h | 6 +-- include/hw/pci-host/q35.h | 8 +--- include/hw/pci-host/sabre.h | 8 +--- include/hw/pci-host/spapr.h | 4 +- include/hw/pci-host/uninorth.h | 4 +- include/hw/pci-host/xilinx-pcie.h | 8 +--- include/hw/pci/pci_bridge.h | 3 +- include/hw/pci/pcie_host.h | 3 +- include/hw/pci/pcie_port.h | 6 +-- include/hw/platform-bus.h | 4 +- include/hw/ppc/mac_dbdma.h | 3 +- include/hw/ppc/openpic.h | 4 +- include/hw/ppc/pnv_core.h | 4 +- include/hw/ppc/pnv_pnor.h | 4 +- include/hw/ppc/pnv_psi.h | 8 +--- include/hw/ppc/spapr.h | 8 +--- include/hw/ppc/spapr_tpm_proxy.h | 4 +- include/hw/ppc/spapr_vio.h | 4 +- include/hw/ppc/xive.h | 12 ++---- include/hw/riscv/opentitan.h | 4 +- include/hw/riscv/riscv_hart.h | 4 +- include/hw/rtc/aspeed_rtc.h | 4 +- include/hw/rtc/goldfish_rtc.h | 4 +- include/hw/rtc/mc146818rtc.h | 4 +- include/hw/rtc/pl031.h | 4 +- include/hw/rtc/xlnx-zynqmp-rtc.h | 4 +- include/hw/s390x/css-bridge.h | 8 +--- include/hw/s390x/s390_flic.h | 4 +- include/hw/s390x/vfio-ccw.h | 4 +- include/hw/scsi/esp.h | 4 +- include/hw/scsi/scsi.h | 3 +- include/hw/sd/aspeed_sdhci.h | 4 +- include/hw/sd/bcm2835_sdhost.h | 4 +- include/hw/sparc/sparc32_dma.h | 16 ++------ include/hw/ssi/imx_spi.h | 4 +- include/hw/ssi/mss-spi.h | 4 +- include/hw/ssi/pl022.h | 4 +- include/hw/ssi/stm32f2xx_spi.h | 4 +- include/hw/ssi/xilinx_spips.h | 7 +--- include/hw/timer/a9gtimer.h | 4 +- include/hw/timer/allwinner-a10-pit.h | 4 +- include/hw/timer/arm_mptimer.h | 4 +- include/hw/timer/armv7m_systick.h | 4 +- include/hw/timer/avr_timer16.h | 4 +- include/hw/timer/bcm2835_systmr.h | 4 +- include/hw/timer/cmsdk-apb-dualtimer.h | 4 +- include/hw/timer/cmsdk-apb-timer.h | 4 +- include/hw/timer/digic-timer.h | 4 +- include/hw/timer/imx_epit.h | 4 +- include/hw/timer/mss-timer.h | 4 +- include/hw/timer/nrf51_timer.h | 4 +- include/hw/usb.h | 4 +- include/hw/usb/chipidea.h | 4 +- include/hw/usb/imx-usb-phy.h | 4 +- include/hw/virtio/vhost-scsi-common.h | 4 +- include/hw/virtio/vhost-scsi.h | 4 +- include/hw/virtio/vhost-user-blk.h | 4 +- include/hw/virtio/vhost-user-fs.h | 4 +- include/hw/virtio/vhost-user-scsi.h | 4 +- include/hw/virtio/vhost-user-vsock.h | 4 +- include/hw/virtio/vhost-vsock-common.h | 4 +- include/hw/virtio/vhost-vsock.h | 4 +- include/hw/virtio/virtio-balloon.h | 4 +- include/hw/virtio/virtio-blk.h | 4 +- include/hw/virtio/virtio-crypto.h | 4 +- include/hw/virtio/virtio-gpu-pci.h | 4 +- include/hw/virtio/virtio-gpu.h | 8 +--- include/hw/virtio/virtio-input.h | 12 ++---- include/hw/virtio/virtio-iommu.h | 4 +- include/hw/virtio/virtio-mmio.h | 4 +- include/hw/virtio/virtio-net.h | 4 +- include/hw/virtio/virtio-rng.h | 4 +- include/hw/virtio/virtio-scsi.h | 8 +--- include/hw/virtio/virtio-serial.h | 7 +--- include/hw/watchdog/cmsdk-apb-watchdog.h | 4 +- include/hw/watchdog/wdt_imx2.h | 4 +- include/hw/xen/xen-block.h | 8 +--- include/io/channel-buffer.h | 4 +- include/io/channel-command.h | 4 +- include/io/channel-file.h | 4 +- include/io/channel-socket.h | 4 +- include/io/channel-tls.h | 4 +- include/io/channel-websock.h | 4 +- include/net/can_emu.h | 3 +- include/sysemu/rng-random.h | 4 +- backends/cryptodev-builtin.c | 5 +-- backends/cryptodev-vhost-user.c | 4 +- backends/hostmem-file.c | 4 +- backends/hostmem-memfd.c | 4 +- backends/rng-builtin.c | 4 +- backends/rng-egd.c | 4 +- backends/tpm/tpm_emulator.c | 4 +- backends/tpm/tpm_passthrough.c | 4 +- hw/acpi/piix4.c | 4 +- hw/alpha/typhoon.c | 4 +- hw/arm/collie.c | 4 +- hw/arm/highbank.c | 4 +- hw/arm/integratorcp.c | 12 ++---- hw/arm/microbit.c | 4 +- hw/arm/musicpal.c | 32 ++++----------- hw/arm/palm.c | 4 +- hw/arm/pxa2xx.c | 12 ++---- hw/arm/pxa2xx_gpio.c | 4 +- hw/arm/pxa2xx_pic.c | 4 +- hw/arm/sbsa-ref.c | 4 +- hw/arm/spitz.c | 20 +++------ hw/arm/stellaris.c | 8 +--- hw/arm/strongarm.c | 24 +++-------- hw/arm/tosa.c | 8 +--- hw/arm/versatilepb.c | 4 +- hw/arm/xilinx_zynq.c | 4 +- hw/arm/xlnx-versal-virt.c | 4 +- hw/arm/xlnx-zcu102.c | 4 +- hw/arm/z2.c | 8 +--- hw/audio/ac97.c | 4 +- hw/audio/adlib.c | 4 +- hw/audio/es1370.c | 3 +- hw/audio/gus.c | 4 +- hw/audio/hda-codec.c | 3 +- hw/audio/marvell_88w8618.c | 4 +- hw/audio/milkymist-ac97.c | 4 +- hw/audio/pcspk.c | 4 +- hw/audio/pl041.c | 4 +- hw/audio/sb16.c | 4 +- hw/audio/wm8750.c | 4 +- hw/block/fdc.c | 16 ++------ hw/block/nand.c | 3 +- hw/block/onenand.c | 4 +- hw/char/debugcon.c | 4 +- hw/char/exynos4210_uart.c | 4 +- hw/char/grlib_apbuart.c | 4 +- hw/char/ipoctal232.c | 3 +- hw/char/lm32_juart.c | 4 +- hw/char/lm32_uart.c | 4 +- hw/char/mcf_uart.c | 4 +- hw/char/milkymist-uart.c | 4 +- hw/char/parallel.c | 4 +- hw/char/serial-isa.c | 4 +- hw/char/serial-pci.c | 4 +- hw/char/spapr_vty.c | 4 +- hw/char/xilinx_uartlite.c | 4 +- hw/cpu/realview_mpcore.c | 4 +- hw/display/ads7846.c | 4 +- hw/display/artist.c | 4 +- hw/display/bochs-display.c | 4 +- hw/display/cg3.c | 4 +- hw/display/cirrus_vga.c | 4 +- hw/display/cirrus_vga_isa.c | 4 +- hw/display/exynos4210_fimd.c | 4 +- hw/display/g364fb.c | 4 +- hw/display/jazz_led.c | 4 +- hw/display/milkymist-tmu2.c | 4 +- hw/display/milkymist-vgafb.c | 4 +- hw/display/next-fb.c | 4 +- hw/display/pl110.c | 4 +- hw/display/sii9022.c | 4 +- hw/display/sm501.c | 8 +--- hw/display/ssd0303.c | 4 +- hw/display/ssd0323.c | 4 +- hw/display/tcx.c | 4 +- hw/display/vga-isa.c | 4 +- hw/display/vga-pci.c | 4 +- hw/dma/i82374.c | 4 +- hw/dma/pl330.c | 3 +- hw/dma/puv3_dma.c | 4 +- hw/dma/pxa2xx_dma.c | 4 +- hw/dma/rc4030.c | 4 +- hw/dma/xilinx_axidma.c | 4 +- hw/gpio/gpio_key.c | 4 +- hw/gpio/max7310.c | 4 +- hw/gpio/mpc8xxx.c | 4 +- hw/gpio/pl061.c | 4 +- hw/gpio/puv3_gpio.c | 4 +- hw/gpio/zaurus.c | 4 +- hw/hppa/dino.c | 4 +- hw/hppa/lasi.c | 4 +- hw/hyperv/hyperv.c | 4 +- hw/hyperv/hyperv_testdev.c | 4 +- hw/i2c/bitbang_i2c.c | 4 +- hw/i2c/exynos4210_i2c.c | 4 +- hw/i2c/mpc_i2c.c | 4 +- hw/i2c/smbus_eeprom.c | 4 +- hw/i2c/smbus_ich9.c | 4 +- hw/i386/kvm/clock.c | 4 +- hw/i386/kvmvapic.c | 4 +- hw/i386/port92.c | 4 +- hw/i386/vmmouse.c | 4 +- hw/i386/vmport.c | 4 +- hw/i386/xen/xen_platform.c | 4 +- hw/i386/xen/xen_pvdevice.c | 4 +- hw/ide/isa.c | 4 +- hw/ide/microdrive.c | 4 +- hw/ide/sii3112.c | 4 +- hw/input/lm832x.c | 4 +- hw/input/milkymist-softusb.c | 4 +- hw/input/pl050.c | 4 +- hw/intc/arm_gicv2m.c | 4 +- hw/intc/exynos4210_combiner.c | 4 +- hw/intc/exynos4210_gic.c | 8 +--- hw/intc/grlib_irqmp.c | 4 +- hw/intc/lm32_pic.c | 4 +- hw/intc/nios2_iic.c | 4 +- hw/intc/ompic.c | 4 +- hw/intc/openpic_kvm.c | 4 +- hw/intc/pl190.c | 4 +- hw/intc/puv3_intc.c | 4 +- hw/intc/slavio_intctl.c | 4 +- hw/ipack/tpci200.c | 4 +- hw/ipmi/ipmi_bmc_extern.c | 4 +- hw/ipmi/isa_ipmi_bt.c | 4 +- hw/ipmi/isa_ipmi_kcs.c | 4 +- hw/ipmi/pci_ipmi_bt.c | 4 +- hw/ipmi/pci_ipmi_kcs.c | 4 +- hw/ipmi/smbus_ipmi.c | 4 +- hw/isa/i82378.c | 4 +- hw/isa/piix4.c | 4 +- hw/isa/vt82c686.c | 16 ++------ hw/m68k/mcf_intc.c | 4 +- hw/m68k/next-cube.c | 4 +- hw/m68k/next-kbd.c | 4 +- hw/microblaze/xlnx-zynqmp-pmu.c | 4 +- hw/mips/gt64xxx_pci.c | 4 +- hw/mips/malta.c | 4 +- hw/misc/applesmc.c | 4 +- hw/misc/arm_integrator_debug.c | 4 +- hw/misc/arm_l2x0.c | 4 +- hw/misc/arm_sysctl.c | 4 +- hw/misc/debugexit.c | 4 +- hw/misc/eccmemctl.c | 4 +- hw/misc/empty_slot.c | 4 +- hw/misc/exynos4210_clk.c | 4 +- hw/misc/exynos4210_pmu.c | 4 +- hw/misc/exynos4210_rng.c | 4 +- hw/misc/milkymist-hpdmc.c | 4 +- hw/misc/milkymist-pfpu.c | 4 +- hw/misc/mst_fpga.c | 4 +- hw/misc/pc-testdev.c | 4 +- hw/misc/pci-testdev.c | 4 +- hw/misc/puv3_pm.c | 4 +- hw/misc/sga.c | 4 +- hw/misc/slavio_misc.c | 4 +- hw/misc/zynq_slcr.c | 4 +- hw/net/dp8393x.c | 4 +- hw/net/e1000e.c | 4 +- hw/net/etraxfs_eth.c | 4 +- hw/net/lan9118.c | 4 +- hw/net/milkymist-minimac2.c | 4 +- hw/net/mipsnet.c | 4 +- hw/net/ne2000-isa.c | 4 +- hw/net/opencores_eth.c | 4 +- hw/net/pcnet-pci.c | 4 +- hw/net/rtl8139.c | 4 +- hw/net/smc91c111.c | 4 +- hw/net/spapr_llan.c | 4 +- hw/net/stellaris_enet.c | 4 +- hw/net/sungem.c | 4 +- hw/net/sunhme.c | 4 +- hw/net/xgmac.c | 4 +- hw/net/xilinx_axienet.c | 4 +- hw/nvram/ds1225y.c | 4 +- hw/nvram/spapr_nvram.c | 4 +- hw/pci-bridge/dec.c | 4 +- hw/pci-bridge/gen_pcie_root_port.c | 4 +- hw/pci-bridge/pci_bridge_dev.c | 4 +- hw/pci-bridge/pcie_pci_bridge.c | 4 +- hw/pci-host/bonito.c | 6 +-- hw/pci-host/grackle.c | 4 +- hw/pci-host/i440fx.c | 4 +- hw/pci-host/ppce500.c | 8 +--- hw/pci-host/prep.c | 4 +- hw/ppc/mpc8544_guts.c | 4 +- hw/ppc/ppc440_pcix.c | 4 +- hw/ppc/ppc440_uc.c | 4 +- hw/ppc/ppc4xx_pci.c | 4 +- hw/ppc/ppce500_spin.c | 4 +- hw/ppc/prep_systemio.c | 4 +- hw/ppc/rs6000_mc.c | 4 +- hw/ppc/spapr_rng.c | 4 +- hw/rtc/ds1338.c | 4 +- hw/rtc/exynos4210_rtc.c | 4 +- hw/rtc/m41t80.c | 4 +- hw/rtc/sun4v-rtc.c | 4 +- hw/rtc/twl92230.c | 4 +- hw/scsi/lsi53c895a.c | 4 +- hw/scsi/spapr_vscsi.c | 4 +- hw/sd/milkymist-memcard.c | 4 +- hw/sd/pl181.c | 4 +- hw/sd/ssi-sd.c | 4 +- hw/sh4/sh_pci.c | 4 +- hw/sparc/sun4m.c | 8 +--- hw/sparc64/sun4u.c | 8 +--- hw/ssi/ssi.c | 3 +- hw/ssi/xilinx_spi.c | 4 +- hw/timer/altera_timer.c | 4 +- hw/timer/arm_timer.c | 8 +--- hw/timer/cadence_ttc.c | 4 +- hw/timer/exynos4210_mct.c | 4 +- hw/timer/exynos4210_pwm.c | 4 +- hw/timer/grlib_gptimer.c | 4 +- hw/timer/hpet.c | 4 +- hw/timer/lm32_timer.c | 4 +- hw/timer/milkymist-sysctl.c | 4 +- hw/timer/puv3_ost.c | 4 +- hw/timer/pxa2xx_timer.c | 4 +- hw/timer/slavio_timer.c | 4 +- hw/tpm/tpm_tis_isa.c | 4 +- hw/tpm/tpm_tis_sysbus.c | 4 +- hw/usb/dev-audio.c | 4 +- hw/usb/dev-hid.c | 4 +- hw/usb/dev-hub.c | 4 +- hw/usb/dev-mtp.c | 3 +- hw/usb/dev-network.c | 4 +- hw/usb/dev-serial.c | 4 +- hw/usb/dev-smartcard-reader.c | 7 +--- hw/usb/dev-uas.c | 3 +- hw/usb/dev-wacom.c | 4 +- hw/usb/hcd-ohci-pci.c | 4 +- hw/usb/host-libusb.c | 4 +- hw/usb/tusb6010.c | 4 +- hw/vfio/ap.c | 4 +- hw/virtio/virtio-input-pci.c | 8 +--- hw/watchdog/wdt_i6300esb.c | 4 +- migration/rdma.c | 4 +- net/can/can_socketcan.c | 4 +- net/dump.c | 4 +- net/filter-buffer.c | 4 +- net/filter-replay.c | 4 +- net/filter-rewriter.c | 4 +- scsi/pr-manager-helper.c | 4 +- target/i386/sev.c | 4 +- 505 files changed, 609 insertions(+), 1795 deletions(-)
hw/9pfs/virtio-9p.h +1 -3
@@ -13,10 +13,8 @@ struct V9fsVirtioState {VirtQueueElement *elems[MAX_REQ ];V9fsState state; }; -typedef struct V9fsVirtioState V9fsVirtioState ;#define TYPE_VIRTIO_9P "virtio-9p-device" -DECLARE_INSTANCE_CHECKER (V9fsVirtioState,VIRTIO_9P , - TYPE_VIRTIO_9P) +OBJECT_DECLARE_SIMPLE_TYPE(V9fsVirtioState, VIRTIO_9P)#endif
hw/audio/intel-hda.h +1 -3
@@ -12,9 +12,7 @@ OBJECT_DECLARE_TYPE(HDACodecDevice, HDACodecDeviceClass, HDA_CODEC_DEVICE) #define TYPE_HDA_BUS "HDA" -typedef struct HDACodecBus HDACodecBus; -DECLARE_INSTANCE_CHECKER(HDACodecBus, HDA_BUS, - TYPE_HDA_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(HDACodecBus, HDA_BUS) typedef void (*hda_codec_response_func)(HDACodecDevice *dev,
hw/display/ati_int.h +1 -3
@@ -30,9 +30,7 @@#define PCI_DEVICE_ID_ATI_RADEON_QY 0x5159#define TYPE_ATI_VGA "ati-vga" -typedef struct ATIVGAState ATIVGAState ; -DECLARE_INSTANCE_CHECKER (ATIVGAState,ATI_VGA , - TYPE_ATI_VGA) +OBJECT_DECLARE_SIMPLE_TYPE(ATIVGAState, ATI_VGA) typedef struct ATIVGARegs { uint32_t mm_index;
hw/display/qxl.h +1 -3
@@ -128,11 +128,9 @@ struct PCIQXLDevice {QXLRect dirty[QXL_NUM_DIRTY_RECTS ];QEMUBH *update_area_bh; }; -typedef struct PCIQXLDevice PCIQXLDevice ;#define TYPE_PCI_QXL "pci-qxl" -DECLARE_INSTANCE_CHECKER (PCIQXLDevice,PCI_QXL , - TYPE_PCI_QXL) +OBJECT_DECLARE_SIMPLE_TYPE(PCIQXLDevice, PCI_QXL)#define PANIC_ON (x) if ((x)) { \ printf("%s: PANIC %s failed\n", __func__, #x); \
hw/i386/amd_iommu.h +1 -3
@@ -297,9 +297,7 @@ struct irte_ga { };#define TYPE_AMD_IOMMU_DEVICE "amd-iommu" -typedef struct AMDVIState AMDVIState ; -DECLARE_INSTANCE_CHECKER (AMDVIState,AMD_IOMMU_DEVICE , - TYPE_AMD_IOMMU_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(AMDVIState, AMD_IOMMU_DEVICE)#define TYPE_AMD_IOMMU_PCI "AMDVI-PCI"
hw/misc/tmp105.h +1 -3
@@ -19,9 +19,7 @@#include "qom/object.h" #define TYPE_TMP105 "tmp105" -typedef struct TMP105State TMP105State ; -DECLARE_INSTANCE_CHECKER (TMP105State,TMP105 , -TYPE_TMP105 ) +OBJECT_DECLARE_SIMPLE_TYPE (TMP105State,TMP105 )/** * TMP105State:
hw/net/fsl_etsec/etsec.h +1 -2
@@ -150,8 +150,7 @@ struct eTSEC {typedef struct eTSEC eTSEC ;#define TYPE_ETSEC_COMMON "eTSEC" -DECLARE_INSTANCE_CHECKER (eTSEC,ETSEC_COMMON , - TYPE_ETSEC_COMMON) +OBJECT_DECLARE_SIMPLE_TYPE(eTSEC, ETSEC_COMMON)#define eTSEC_TRANSMIT 1#define eTSEC_RECEIVE 2
hw/net/tulip.h +1 -3
@@ -6,9 +6,7 @@#include "qom/object.h" #define TYPE_TULIP "tulip" -typedef struct TULIPState TULIPState ; -DECLARE_INSTANCE_CHECKER (TULIPState,TULIP , - TYPE_TULIP) +OBJECT_DECLARE_SIMPLE_TYPE(TULIPState, TULIP)#define CSR (_x) ((_x) << 3)
hw/ppc/e500-ccsr.h +1 -3
@@ -11,10 +11,8 @@ struct PPCE500CCSRState {MemoryRegion ccsr_space; }; -typedef struct PPCE500CCSRState PPCE500CCSRState ;#define TYPE_CCSR "e500-ccsr" -DECLARE_INSTANCE_CHECKER (PPCE500CCSRState,CCSR , - TYPE_CCSR) +OBJECT_DECLARE_SIMPLE_TYPE(PPCE500CCSRState, CCSR)#endif /* E500_CCSR_H */
hw/ppc/mac.h +1 -3
@@ -92,9 +92,7 @@ struct Core99MachineState {/* Mac NVRAM */ #define TYPE_MACIO_NVRAM "macio-nvram" -typedef struct MacIONVRAMState MacIONVRAMState ; -DECLARE_INSTANCE_CHECKER (MacIONVRAMState,MACIO_NVRAM , - TYPE_MACIO_NVRAM) +OBJECT_DECLARE_SIMPLE_TYPE(MacIONVRAMState, MACIO_NVRAM)struct MacIONVRAMState {/*< private >*/
hw/s390x/ipl.h +1 -3
@@ -153,9 +153,7 @@ struct QemuIplParameters {typedef struct QemuIplParameters QemuIplParameters ;#define TYPE_S390_IPL "s390-ipl" -typedef struct S390IPLState S390IPLState ; -DECLARE_INSTANCE_CHECKER (S390IPLState,S390_IPL , - TYPE_S390_IPL) +OBJECT_DECLARE_SIMPLE_TYPE(S390IPLState, S390_IPL)struct S390IPLState {/*< private >*/
hw/s390x/s390-pci-bus.h +4 -12
@@ -37,18 +37,10 @@#define UID_UNDEFINED 0#define UID_CHECKING_ENABLED 0x01 -typedef struct S390pciState S390pciState ; -DECLARE_INSTANCE_CHECKER (S390pciState,S390_PCI_HOST_BRIDGE , - TYPE_S390_PCI_HOST_BRIDGE) -typedef struct S390PCIBus S390PCIBus ; -DECLARE_INSTANCE_CHECKER (S390PCIBus,S390_PCI_BUS , - TYPE_S390_PCI_BUS) -typedef struct S390PCIBusDevice S390PCIBusDevice ; -DECLARE_INSTANCE_CHECKER (S390PCIBusDevice,S390_PCI_DEVICE , - TYPE_S390_PCI_DEVICE) -typedef struct S390PCIIOMMU S390PCIIOMMU ; -DECLARE_INSTANCE_CHECKER (S390PCIIOMMU ,S390_PCI_IOMMU , - TYPE_S390_PCI_IOMMU) +OBJECT_DECLARE_SIMPLE_TYPE(S390pciState, S390_PCI_HOST_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(S390PCIBus, S390_PCI_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(S390PCIBusDevice, S390_PCI_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(S390PCIIOMMU, S390_PCI_IOMMU)#define HP_EVENT_TO_CONFIGURED 0x0301#define HP_EVENT_RESERVED_TO_STANDBY 0x0302
hw/s390x/virtio-ccw.h +13 -39
130 lines not on this page · raw message
hw/usb/hcd-ehci.h +2 -6
@@ -329,9 +329,7 @@ void usb_ehci_unrealize(EHCIState *s, DeviceState *dev);void ehci_reset (void *opaque);#define TYPE_PCI_EHCI "pci-ehci-usb" -typedef struct EHCIPCIState EHCIPCIState ; -DECLARE_INSTANCE_CHECKER (EHCIPCIState,PCI_EHCI , - TYPE_PCI_EHCI) +OBJECT_DECLARE_SIMPLE_TYPE(EHCIPCIState, PCI_EHCI)struct EHCIPCIState {/*< private >*/
@@ -371,9 +369,7 @@ struct SysBusEHCIClass {uint16_t portnr; }; -typedef struct FUSBH200EHCIState FUSBH200EHCIState ; -DECLARE_INSTANCE_CHECKER (FUSBH200EHCIState,FUSBH200_EHCI , - TYPE_FUSBH200_EHCI) +OBJECT_DECLARE_SIMPLE_TYPE(FUSBH200EHCIState, FUSBH200_EHCI)struct FUSBH200EHCIState {/*< private >*/
hw/usb/hcd-ohci.h +1 -3
@@ -93,9 +93,7 @@ typedef struct OHCIState { } OHCIState;#define TYPE_SYSBUS_OHCI "sysbus-ohci" -typedef struct OHCISysBusState OHCISysBusState ; -DECLARE_INSTANCE_CHECKER (OHCISysBusState,SYSBUS_OHCI , - TYPE_SYSBUS_OHCI) +OBJECT_DECLARE_SIMPLE_TYPE(OHCISysBusState, SYSBUS_OHCI)struct OHCISysBusState {/*< private >*/
hw/usb/hcd-xhci.h +1 -3
@@ -27,9 +27,7 @@#define TYPE_NEC_XHCI "nec-usb-xhci"#define TYPE_QEMU_XHCI "qemu-xhci" -typedef struct XHCIState XHCIState ; -DECLARE_INSTANCE_CHECKER (XHCIState,XHCI , - TYPE_XHCI) +OBJECT_DECLARE_SIMPLE_TYPE(XHCIState, XHCI)#define MAXPORTS_2 15#define MAXPORTS_3 15
hw/vfio/pci.h +1 -3
@@ -115,9 +115,7 @@ typedef struct VFIOMSIXInfo { } VFIOMSIXInfo;#define TYPE_VFIO_PCI "vfio-pci" -typedef struct VFIOPCIDevice VFIOPCIDevice ; -DECLARE_INSTANCE_CHECKER (VFIOPCIDevice,VFIO_PCI , - TYPE_VFIO_PCI) +OBJECT_DECLARE_SIMPLE_TYPE(VFIOPCIDevice, VFIO_PCI)struct VFIOPCIDevice {PCIDevice pdev;
hw/xen/xen_pt.h +1 -3
@@ -37,11 +37,9 @@ void xen_pt_log(const PCIDevice *d, const char *f, ...) GCC_FMT_ATTR(2, 3);typedef const struct XenPTRegInfo XenPTRegInfo ;typedef struct XenPTReg XenPTReg ; -typedef struct XenPCIPassthroughState XenPCIPassthroughState ;#define TYPE_XEN_PT_DEVICE "xen-pci-passthrough" -DECLARE_INSTANCE_CHECKER (XenPCIPassthroughState,XEN_PT_DEVICE , - TYPE_XEN_PT_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(XenPCIPassthroughState, XEN_PT_DEVICE)uint32_t igd_read_opregion (XenPCIPassthroughState *s);void igd_write_opregion (XenPCIPassthroughState *s,uint32_t val);
include/block/throttle-groups.h +1 -3
@@ -60,9 +60,7 @@ typedef struct ThrottleGroupMember { } ThrottleGroupMember;#define TYPE_THROTTLE_GROUP "throttle-group" -typedef struct ThrottleGroup ThrottleGroup ; -DECLARE_INSTANCE_CHECKER (ThrottleGroup,THROTTLE_GROUP , - TYPE_THROTTLE_GROUP) +OBJECT_DECLARE_SIMPLE_TYPE(ThrottleGroup, THROTTLE_GROUP)const char *throttle_group_get_name (ThrottleGroupMember *tgm);
include/hw/acpi/generic_event_device.h +1 -3
@@ -67,9 +67,7 @@#define ACPI_POWER_BUTTON_DEVICE "PWRB"#define TYPE_ACPI_GED "acpi-ged" -typedef struct AcpiGedState AcpiGedState ; -DECLARE_INSTANCE_CHECKER (AcpiGedState,ACPI_GED , - TYPE_ACPI_GED) +OBJECT_DECLARE_SIMPLE_TYPE(AcpiGedState, ACPI_GED)#define TYPE_ACPI_GED_X86 "acpi-ged-x86"#define ACPI_GED_X86 (obj) \
include/hw/acpi/vmgenid.h +1 -3
@@ -16,9 +16,7 @@* OVMF SDT Header Probe Supressor */ -typedef struct VmGenIdState VmGenIdState ; -DECLARE_INSTANCE_CHECKER (VmGenIdState,VMGENID , - TYPE_VMGENID) +OBJECT_DECLARE_SIMPLE_TYPE(VmGenIdState, VMGENID)struct VmGenIdState {DeviceClass parent_obj;
include/hw/adc/stm32f2xx_adc.h +1 -3
@@ -59,9 +59,7 @@#define ADC_COMMON_ADDRESS 0x100#define TYPE_STM32F2XX_ADC "stm32f2xx-adc" -typedef struct STM32F2XXADCState STM32F2XXADCState ; -DECLARE_INSTANCE_CHECKER (STM32F2XXADCState,STM32F2XX_ADC , - TYPE_STM32F2XX_ADC) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F2XXADCState, STM32F2XX_ADC)struct STM32F2XXADCState {/* <private> */
include/hw/arm/allwinner-a10.h +1 -3
@@ -22,9 +22,7 @@#define AW_A10_NUM_USB 2#define TYPE_AW_A10 "allwinner-a10" -typedef struct AwA10State AwA10State ; -DECLARE_INSTANCE_CHECKER (AwA10State,AW_A10 , - TYPE_AW_A10) +OBJECT_DECLARE_SIMPLE_TYPE(AwA10State, AW_A10)struct AwA10State {/*< private >*/
include/hw/arm/allwinner-h3.h +1 -3
@@ -106,9 +106,7 @@ enum {#define TYPE_AW_H3 "allwinner-h3"/** Convert input object to Allwinner H3 state object */ -typedef struct AwH3State AwH3State ; -DECLARE_INSTANCE_CHECKER (AwH3State,AW_H3 , -TYPE_AW_H3 ) +OBJECT_DECLARE_SIMPLE_TYPE (AwH3State,AW_H3 )/** @} */
include/hw/arm/armv7m.h +2 -6
@@ -16,9 +16,7 @@#include "qom/object.h" #define TYPE_BITBAND "ARM,bitband-memory" -typedef struct BitBandState BitBandState ; -DECLARE_INSTANCE_CHECKER (BitBandState,BITBAND , - TYPE_BITBAND) +OBJECT_DECLARE_SIMPLE_TYPE(BitBandState, BITBAND)struct BitBandState {/*< private >*/
@@ -32,9 +30,7 @@ struct BitBandState { };#define TYPE_ARMV7M "armv7m" -typedef struct ARMv7MState ARMv7MState ; -DECLARE_INSTANCE_CHECKER (ARMv7MState,ARMV7M , - TYPE_ARMV7M) +OBJECT_DECLARE_SIMPLE_TYPE(ARMv7MState, ARMV7M)#define ARMV7M_NUM_BITBANDS 2
include/hw/arm/bcm2835_peripherals.h +1 -3
@@ -32,9 +32,7 @@#include "qom/object.h" #define TYPE_BCM2835_PERIPHERALS "bcm2835-peripherals" -typedef struct BCM2835PeripheralState BCM2835PeripheralState ; -DECLARE_INSTANCE_CHECKER (BCM2835PeripheralState,BCM2835_PERIPHERALS , - TYPE_BCM2835_PERIPHERALS) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835PeripheralState, BCM2835_PERIPHERALS)struct BCM2835PeripheralState {/*< private >*/
include/hw/arm/digic.h +1 -3
@@ -25,9 +25,7 @@#define TYPE_DIGIC "digic" -typedef struct DigicState DigicState ; -DECLARE_INSTANCE_CHECKER (DigicState,DIGIC , - TYPE_DIGIC) +OBJECT_DECLARE_SIMPLE_TYPE(DigicState, DIGIC)#define DIGIC4_NB_TIMERS 3
include/hw/arm/exynos4210.h +1 -3
@@ -103,11 +103,9 @@ struct Exynos4210State {I2CBus *i2c_if[EXYNOS4210_I2C_NUMBER ];qemu_or_irq pl330_irq_orgate[EXYNOS4210_NUM_DMA ]; }; -typedef struct Exynos4210State Exynos4210State ;#define TYPE_EXYNOS4210_SOC "exynos4210" -DECLARE_INSTANCE_CHECKER (Exynos4210State,EXYNOS4210_SOC , - TYPE_EXYNOS4210_SOC) +OBJECT_DECLARE_SIMPLE_TYPE(Exynos4210State, EXYNOS4210_SOC)void exynos4210_write_secondary (ARMCPU *cpu,const struct arm_boot_info *info);
include/hw/arm/fsl-imx25.h +1 -3
@@ -35,9 +35,7 @@#include "qom/object.h" #define TYPE_FSL_IMX25 "fsl,imx25" -typedef struct FslIMX25State FslIMX25State ; -DECLARE_INSTANCE_CHECKER (FslIMX25State,FSL_IMX25 , - TYPE_FSL_IMX25) +OBJECT_DECLARE_SIMPLE_TYPE(FslIMX25State, FSL_IMX25)#define FSL_IMX25_NUM_UARTS 5#define FSL_IMX25_NUM_GPTS 4
include/hw/arm/fsl-imx31.h +1 -3
@@ -31,9 +31,7 @@#include "qom/object.h" #define TYPE_FSL_IMX31 "fsl,imx31" -typedef struct FslIMX31State FslIMX31State ; -DECLARE_INSTANCE_CHECKER (FslIMX31State,FSL_IMX31 , - TYPE_FSL_IMX31) +OBJECT_DECLARE_SIMPLE_TYPE(FslIMX31State, FSL_IMX31)#define FSL_IMX31_NUM_UARTS 2#define FSL_IMX31_NUM_EPITS 2
include/hw/arm/fsl-imx6.h +1 -3
@@ -37,9 +37,7 @@#include "qom/object.h" #define TYPE_FSL_IMX6 "fsl,imx6" -typedef struct FslIMX6State FslIMX6State ; -DECLARE_INSTANCE_CHECKER (FslIMX6State,FSL_IMX6 , - TYPE_FSL_IMX6) +OBJECT_DECLARE_SIMPLE_TYPE(FslIMX6State, FSL_IMX6)#define FSL_IMX6_NUM_CPUS 4#define FSL_IMX6_NUM_UARTS 5
include/hw/arm/fsl-imx6ul.h +1 -3
@@ -41,9 +41,7 @@#include "qom/object.h" #define TYPE_FSL_IMX6UL "fsl,imx6ul" -typedef struct FslIMX6ULState FslIMX6ULState ; -DECLARE_INSTANCE_CHECKER (FslIMX6ULState,FSL_IMX6UL , - TYPE_FSL_IMX6UL) +OBJECT_DECLARE_SIMPLE_TYPE(FslIMX6ULState, FSL_IMX6UL)enum FslIMX6ULConfiguration {FSL_IMX6UL_NUM_CPUS =1 ,
include/hw/arm/fsl-imx7.h +1 -3
@@ -42,9 +42,7 @@#include "qom/object.h" #define TYPE_FSL_IMX7 "fsl,imx7" -typedef struct FslIMX7State FslIMX7State ; -DECLARE_INSTANCE_CHECKER (FslIMX7State,FSL_IMX7 , - TYPE_FSL_IMX7) +OBJECT_DECLARE_SIMPLE_TYPE(FslIMX7State, FSL_IMX7)enum FslIMX7Configuration {FSL_IMX7_NUM_CPUS =2 ,
include/hw/arm/msf2-soc.h +1 -3
@@ -33,9 +33,7 @@#include "qom/object.h" #define TYPE_MSF2_SOC "msf2-soc" -typedef struct MSF2State MSF2State ; -DECLARE_INSTANCE_CHECKER (MSF2State,MSF2_SOC , - TYPE_MSF2_SOC) +OBJECT_DECLARE_SIMPLE_TYPE(MSF2State, MSF2_SOC)#define MSF2_NUM_SPIS 2#define MSF2_NUM_UARTS 2
include/hw/arm/nrf51_soc.h +1 -3
@@ -20,9 +20,7 @@#include "qom/object.h" #define TYPE_NRF51_SOC "nrf51-soc" -typedef struct NRF51State NRF51State ; -DECLARE_INSTANCE_CHECKER (NRF51State,NRF51_SOC , - TYPE_NRF51_SOC) +OBJECT_DECLARE_SIMPLE_TYPE(NRF51State, NRF51_SOC)#define NRF51_NUM_TIMERS 3
include/hw/arm/omap.h +1 -3
@@ -94,9 +94,7 @@ void omap_intc_set_fclk(omap_intr_handler *intc, omap_clk clk);/* omap_i2c.c */ #define TYPE_OMAP_I2C "omap_i2c" -typedef struct OMAPI2CState OMAPI2CState ; -DECLARE_INSTANCE_CHECKER (OMAPI2CState,OMAP_I2C , -TYPE_OMAP_I2C ) +OBJECT_DECLARE_SIMPLE_TYPE (OMAPI2CState,OMAP_I2C )/* TODO: clock framework (see above) */
include/hw/arm/pxa.h +4 -11
@@ -88,9 +88,7 @@ void pxa2xx_lcd_vsync_notifier(PXA2xxLCDState *s, qemu_irq handler);/* pxa2xx_mmci.c */ #define TYPE_PXA2XX_MMCI "pxa2xx-mmci" -typedef struct PXA2xxMMCIState PXA2xxMMCIState ; -DECLARE_INSTANCE_CHECKER (PXA2xxMMCIState,PXA2XX_MMCI , - TYPE_PXA2XX_MMCI) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxMMCIState, PXA2XX_MMCI) PXA2xxMMCIState *pxa2xx_mmci_init(MemoryRegion *sysmem, hwaddr base,
@@ -100,9 +98,7 @@ void pxa2xx_mmci_handlers(PXA2xxMMCIState *s, qemu_irq readonly,/* pxa2xx_pcmcia.c */ #define TYPE_PXA2XX_PCMCIA "pxa2xx-pcmcia" -typedef struct PXA2xxPCMCIAState PXA2xxPCMCIAState ; -DECLARE_INSTANCE_CHECKER (PXA2xxPCMCIAState,PXA2XX_PCMCIA , - TYPE_PXA2XX_PCMCIA) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxPCMCIAState, PXA2XX_PCMCIA)PXA2xxPCMCIAState *pxa2xx_pcmcia_init (MemoryRegion *sysmem,hwaddr base);
@@ -130,13 +126,10 @@ I2CBus *pxa2xx_i2c_bus(PXA2xxI2CState *s);#define TYPE_PXA2XX_I2C "pxa2xx_i2c"typedef struct PXA2xxI2SState PXA2xxI2SState ; -DECLARE_INSTANCE_CHECKER (PXA2xxI2CState,PXA2XX_I2C , - TYPE_PXA2XX_I2C) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxI2CState, PXA2XX_I2C)#define TYPE_PXA2XX_FIR "pxa2xx-fir" -typedef struct PXA2xxFIrState PXA2xxFIrState ; -DECLARE_INSTANCE_CHECKER (PXA2xxFIrState,PXA2XX_FIR , - TYPE_PXA2XX_FIR) +OBJECT_DECLARE_SIMPLE_TYPE(PXA2xxFIrState, PXA2XX_FIR) typedef struct { ARMCPU *cpu;
include/hw/arm/stm32f205_soc.h +1 -3
@@ -35,9 +35,7 @@#include "qom/object.h" #define TYPE_STM32F205_SOC "stm32f205-soc" -typedef struct STM32F205State STM32F205State ; -DECLARE_INSTANCE_CHECKER (STM32F205State,STM32F205_SOC , - TYPE_STM32F205_SOC) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F205State, STM32F205_SOC)#define STM_NUM_USARTS 6#define STM_NUM_TIMERS 4
include/hw/arm/stm32f405_soc.h +1 -3
@@ -36,9 +36,7 @@#include "qom/object.h" #define TYPE_STM32F405_SOC "stm32f405-soc" -typedef struct STM32F405State STM32F405State ; -DECLARE_INSTANCE_CHECKER (STM32F405State,STM32F405_SOC , - TYPE_STM32F405_SOC) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F405State, STM32F405_SOC)#define STM_NUM_USARTS 7#define STM_NUM_TIMERS 4
include/hw/arm/xlnx-versal.h +1 -3
@@ -23,9 +23,7 @@#include "qom/object.h" #define TYPE_XLNX_VERSAL "xlnx-versal" -typedef struct Versal Versal ; -DECLARE_INSTANCE_CHECKER (Versal,XLNX_VERSAL , - TYPE_XLNX_VERSAL) +OBJECT_DECLARE_SIMPLE_TYPE(Versal, XLNX_VERSAL)#define XLNX_VERSAL_NR_ACPUS 2#define XLNX_VERSAL_NR_UARTS 2
include/hw/arm/xlnx-zynqmp.h +1 -3
@@ -35,9 +35,7 @@#include "qom/object.h" #define TYPE_XLNX_ZYNQMP "xlnx,zynqmp" -typedef struct XlnxZynqMPState XlnxZynqMPState ; -DECLARE_INSTANCE_CHECKER (XlnxZynqMPState,XLNX_ZYNQMP , - TYPE_XLNX_ZYNQMP) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqMPState, XLNX_ZYNQMP)#define XLNX_ZYNQMP_NUM_APU_CPUS 4#define XLNX_ZYNQMP_NUM_RPU_CPUS 2
include/hw/block/flash.h +2 -6
@@ -9,9 +9,7 @@/* pflash_cfi01.c */ #define TYPE_PFLASH_CFI01 "cfi.pflash01" -typedef struct PFlashCFI01 PFlashCFI01 ; -DECLARE_INSTANCE_CHECKER (PFlashCFI01,PFLASH_CFI01 , - TYPE_PFLASH_CFI01) +OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI01, PFLASH_CFI01) PFlashCFI01 *pflash_cfi01_register(hwaddr base,
@@ -30,9 +28,7 @@ void pflash_cfi01_legacy_drive(PFlashCFI01 *dev, DriveInfo *dinfo);/* pflash_cfi02.c */ #define TYPE_PFLASH_CFI02 "cfi.pflash02" -typedef struct PFlashCFI02 PFlashCFI02 ; -DECLARE_INSTANCE_CHECKER (PFlashCFI02,PFLASH_CFI02 , - TYPE_PFLASH_CFI02) +OBJECT_DECLARE_SIMPLE_TYPE(PFlashCFI02, PFLASH_CFI02) PFlashCFI02 *pflash_cfi02_register(hwaddr base,
include/hw/block/swim.h +3 -9
@@ -17,13 +17,10 @@#define SWIM_MAX_FD 2 -typedef struct SWIMDrive SWIMDrive ; -typedef struct SWIMBus SWIMBus ;typedef struct SWIMCtrl SWIMCtrl ;#define TYPE_SWIM_DRIVE "swim-drive" -DECLARE_INSTANCE_CHECKER (SWIMDrive,SWIM_DRIVE , - TYPE_SWIM_DRIVE) +OBJECT_DECLARE_SIMPLE_TYPE(SWIMDrive, SWIM_DRIVE)struct SWIMDrive {DeviceState qdev;
@@ -32,8 +29,7 @@ struct SWIMDrive { };#define TYPE_SWIM_BUS "swim-bus" -DECLARE_INSTANCE_CHECKER (SWIMBus,SWIM_BUS , - TYPE_SWIM_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(SWIMBus, SWIM_BUS)struct SWIMBus {BusState bus;
@@ -70,9 +66,7 @@ struct SWIMCtrl { };#define TYPE_SWIM "swim" -typedef struct Swim Swim ; -DECLARE_INSTANCE_CHECKER (Swim,SWIM , - TYPE_SWIM) +OBJECT_DECLARE_SIMPLE_TYPE(Swim, SWIM)struct Swim {SysBusDevice parent_obj;
include/hw/char/avr_usart.h +1 -3
@@ -58,9 +58,7 @@#define USART_CSRC_CSZ0 (1 << 1)#define TYPE_AVR_USART "avr-usart" -typedef struct AVRUsartState AVRUsartState ; -DECLARE_INSTANCE_CHECKER (AVRUsartState,AVR_USART , - TYPE_AVR_USART) +OBJECT_DECLARE_SIMPLE_TYPE(AVRUsartState, AVR_USART)struct AVRUsartState {/* <private> */
include/hw/char/bcm2835_aux.h +1 -3
@@ -14,9 +14,7 @@#include "qom/object.h" #define TYPE_BCM2835_AUX "bcm2835-aux" -typedef struct BCM2835AuxState BCM2835AuxState ; -DECLARE_INSTANCE_CHECKER (BCM2835AuxState,BCM2835_AUX , - TYPE_BCM2835_AUX) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835AuxState, BCM2835_AUX)#define BCM2835_AUX_RX_FIFO_LEN 8
include/hw/char/cadence_uart.h +1 -3
@@ -32,9 +32,7 @@#define CADENCE_UART_R_MAX (0x48/4)#define TYPE_CADENCE_UART "cadence_uart" -typedef struct CadenceUARTState CadenceUARTState ; -DECLARE_INSTANCE_CHECKER (CadenceUARTState,CADENCE_UART , - TYPE_CADENCE_UART) +OBJECT_DECLARE_SIMPLE_TYPE(CadenceUARTState, CADENCE_UART)struct CadenceUARTState {/*< private >*/
include/hw/char/cmsdk-apb-uart.h +1 -3
@@ -18,9 +18,7 @@#include "qom/object.h" #define TYPE_CMSDK_APB_UART "cmsdk-apb-uart" -typedef struct CMSDKAPBUART CMSDKAPBUART ; -DECLARE_INSTANCE_CHECKER (CMSDKAPBUART ,CMSDK_APB_UART , - TYPE_CMSDK_APB_UART) +OBJECT_DECLARE_SIMPLE_TYPE(CMSDKAPBUART, CMSDK_APB_UART)struct CMSDKAPBUART {/*< private >*/
include/hw/char/digic-uart.h +1 -3
@@ -23,9 +23,7 @@#include "qom/object.h" #define TYPE_DIGIC_UART "digic-uart" -typedef struct DigicUartState DigicUartState ; -DECLARE_INSTANCE_CHECKER (DigicUartState,DIGIC_UART , - TYPE_DIGIC_UART) +OBJECT_DECLARE_SIMPLE_TYPE(DigicUartState, DIGIC_UART)enum {R_TX =0x00 ,
include/hw/char/escc.h +1 -3
@@ -11,9 +11,7 @@#define TYPE_ESCC "escc"#define ESCC_SIZE 4 -typedef struct ESCCState ESCCState ; -DECLARE_INSTANCE_CHECKER (ESCCState,ESCC , - TYPE_ESCC) +OBJECT_DECLARE_SIMPLE_TYPE(ESCCState, ESCC) typedef enum { escc_chn_a, escc_chn_b,
include/hw/char/ibex_uart.h +1 -3
@@ -70,9 +70,7 @@ REG32(TIMEOUT_CTRL, 0x2c)#define IBEX_UART_CLOCK 50000000/* 50MHz clock */ #define TYPE_IBEX_UART "ibex-uart" -typedef struct IbexUartState IbexUartState ; -DECLARE_INSTANCE_CHECKER (IbexUartState,IBEX_UART , - TYPE_IBEX_UART) +OBJECT_DECLARE_SIMPLE_TYPE(IbexUartState, IBEX_UART)struct IbexUartState {/* <private> */
include/hw/char/imx_serial.h +1 -3
@@ -23,9 +23,7 @@#include "qom/object.h" #define TYPE_IMX_SERIAL "imx.serial" -typedef struct IMXSerialState IMXSerialState ; -DECLARE_INSTANCE_CHECKER (IMXSerialState,IMX_SERIAL , - TYPE_IMX_SERIAL) +OBJECT_DECLARE_SIMPLE_TYPE(IMXSerialState, IMX_SERIAL)#define URXD_CHARRDY (1<<15)/* character read is valid */ #define URXD_ERR (1<<14)/* Character has error */
include/hw/char/nrf51_uart.h +1 -3
@@ -20,9 +20,7 @@#define UART_SIZE 0x1000#define TYPE_NRF51_UART "nrf51_soc.uart" -typedef struct NRF51UARTState NRF51UARTState ; -DECLARE_INSTANCE_CHECKER (NRF51UARTState,NRF51_UART , - TYPE_NRF51_UART) +OBJECT_DECLARE_SIMPLE_TYPE(NRF51UARTState, NRF51_UART) REG32(UART_STARTRX, 0x000)REG32 (UART_STOPRX ,0x004 )
include/hw/char/pl011.h +1 -3
@@ -22,9 +22,7 @@#include "qom/object.h" #define TYPE_PL011 "pl011" -typedef struct PL011State PL011State ; -DECLARE_INSTANCE_CHECKER (PL011State,PL011 , -TYPE_PL011 ) +OBJECT_DECLARE_SIMPLE_TYPE (PL011State,PL011 ) /* This shares the same struct (and cast macro) as the base pl011 device */#define TYPE_PL011_LUMINARY "pl011_luminary"
include/hw/char/serial.h +3 -8
@@ -89,14 +89,12 @@ struct SerialMM {uint8_t regshift;uint8_t endianness; }; -typedef struct SerialMM SerialMM ;struct SerialIO {SysBusDevice parent;SerialState serial; }; -typedef struct SerialIO SerialIO ;extern const VMStateDescription vmstate_serial;extern const MemoryRegionOps serial_io_ops;
@@ -104,16 +102,13 @@ extern const MemoryRegionOps serial_io_ops;void serial_set_frequency (SerialState *s,uint32_t frequency);#define TYPE_SERIAL "serial" -DECLARE_INSTANCE_CHECKER (SerialState,SERIAL , - TYPE_SERIAL) +OBJECT_DECLARE_SIMPLE_TYPE(SerialState, SERIAL)#define TYPE_SERIAL_MM "serial-mm" -DECLARE_INSTANCE_CHECKER (SerialMM,SERIAL_MM , - TYPE_SERIAL_MM) +OBJECT_DECLARE_SIMPLE_TYPE(SerialMM, SERIAL_MM)#define TYPE_SERIAL_IO "serial-io" -DECLARE_INSTANCE_CHECKER (SerialIO,SERIAL_IO , - TYPE_SERIAL_IO) +OBJECT_DECLARE_SIMPLE_TYPE(SerialIO, SERIAL_IO) SerialMM *serial_mm_init(MemoryRegion *address_space, hwaddr base, int regshift,
include/hw/char/stm32f2xx_usart.h +1 -3
@@ -54,9 +54,7 @@#define USART_CR1_RE (1 << 2)#define TYPE_STM32F2XX_USART "stm32f2xx-usart" -typedef struct STM32F2XXUsartState STM32F2XXUsartState ; -DECLARE_INSTANCE_CHECKER (STM32F2XXUsartState,STM32F2XX_USART , - TYPE_STM32F2XX_USART) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F2XXUsartState, STM32F2XX_USART)struct STM32F2XXUsartState {/* <private> */
include/hw/clock.h +1 -3
@@ -18,9 +18,7 @@#include "qemu/queue.h" #define TYPE_CLOCK "clock" -typedef struct Clock Clock ; -DECLARE_INSTANCE_CHECKER (Clock,CLOCK , - TYPE_CLOCK) +OBJECT_DECLARE_SIMPLE_TYPE(Clock, CLOCK)typedef void ClockCallback (void *opaque);
include/hw/core/generic-loader.h +1 -3
@@ -40,10 +40,8 @@ struct GenericLoaderState {bool data_be;bool set_pc; }; -typedef struct GenericLoaderState GenericLoaderState ;#define TYPE_GENERIC_LOADER "loader" -DECLARE_INSTANCE_CHECKER (GenericLoaderState,GENERIC_LOADER , - TYPE_GENERIC_LOADER) +OBJECT_DECLARE_SIMPLE_TYPE(GenericLoaderState, GENERIC_LOADER)#endif
include/hw/core/split-irq.h +1 -3
@@ -42,10 +42,8 @@#define MAX_SPLIT_LINES 16 -typedef struct SplitIRQ SplitIRQ ; -DECLARE_INSTANCE_CHECKER (SplitIRQ,SPLIT_IRQ , - TYPE_SPLIT_IRQ) +OBJECT_DECLARE_SIMPLE_TYPE(SplitIRQ, SPLIT_IRQ)struct SplitIRQ {DeviceState parent_obj;
include/hw/cpu/a15mpcore.h +1 -3
@@ -27,9 +27,7 @@/* A15MP private memory region. */ #define TYPE_A15MPCORE_PRIV "a15mpcore_priv" -typedef struct A15MPPrivState A15MPPrivState ; -DECLARE_INSTANCE_CHECKER (A15MPPrivState,A15MPCORE_PRIV , - TYPE_A15MPCORE_PRIV) +OBJECT_DECLARE_SIMPLE_TYPE(A15MPPrivState, A15MPCORE_PRIV)struct A15MPPrivState {/*< private >*/
include/hw/cpu/a9mpcore.h +1 -3
@@ -18,9 +18,7 @@#include "qom/object.h" #define TYPE_A9MPCORE_PRIV "a9mpcore_priv" -typedef struct A9MPPrivState A9MPPrivState ; -DECLARE_INSTANCE_CHECKER (A9MPPrivState,A9MPCORE_PRIV , - TYPE_A9MPCORE_PRIV) +OBJECT_DECLARE_SIMPLE_TYPE(A9MPPrivState, A9MPCORE_PRIV)struct A9MPPrivState {/*< private >*/
include/hw/cpu/arm11mpcore.h +1 -3
@@ -17,9 +17,7 @@#include "qom/object.h" #define TYPE_ARM11MPCORE_PRIV "arm11mpcore_priv" -typedef struct ARM11MPCorePriveState ARM11MPCorePriveState ; -DECLARE_INSTANCE_CHECKER (ARM11MPCorePriveState,ARM11MPCORE_PRIV , - TYPE_ARM11MPCORE_PRIV) +OBJECT_DECLARE_SIMPLE_TYPE(ARM11MPCorePriveState, ARM11MPCORE_PRIV)struct ARM11MPCorePriveState {SysBusDevice parent_obj;
include/hw/cpu/cluster.h +1 -3
@@ -55,9 +55,7 @@*/ #define TYPE_CPU_CLUSTER "cpu-cluster" -typedef struct CPUClusterState CPUClusterState ; -DECLARE_INSTANCE_CHECKER (CPUClusterState,CPU_CLUSTER , -TYPE_CPU_CLUSTER ) +OBJECT_DECLARE_SIMPLE_TYPE (CPUClusterState,CPU_CLUSTER )/* * This limit is imposed by TCG, which puts the cluster ID into an
include/hw/cpu/core.h +1 -3
@@ -14,9 +14,7 @@#define TYPE_CPU_CORE "cpu-core" -typedef struct CPUCore CPUCore ; -DECLARE_INSTANCE_CHECKER (CPUCore,CPU_CORE , - TYPE_CPU_CORE) +OBJECT_DECLARE_SIMPLE_TYPE(CPUCore, CPU_CORE)struct CPUCore {/*< private >*/
include/hw/display/bcm2835_fb.h +1 -3
@@ -17,9 +17,7 @@#include "qom/object.h" #define TYPE_BCM2835_FB "bcm2835-fb" -typedef struct BCM2835FBState BCM2835FBState ; -DECLARE_INSTANCE_CHECKER (BCM2835FBState,BCM2835_FB , -TYPE_BCM2835_FB ) +OBJECT_DECLARE_SIMPLE_TYPE (BCM2835FBState,BCM2835_FB )/* * Configuration information about the fb which the guest can program
include/hw/display/dpcd.h +1 -3
@@ -26,11 +26,9 @@#define DPCD_H #include "qom/object.h" -typedef struct DPCDState DPCDState ;#define TYPE_DPCD "dpcd" -DECLARE_INSTANCE_CHECKER (DPCDState,DPCD , -TYPE_DPCD ) +OBJECT_DECLARE_SIMPLE_TYPE (DPCDState,DPCD ) /* DCPD Revision. */#define DPCD_REVISION 0x00
include/hw/display/i2c-ddc.h +1 -3
@@ -34,10 +34,8 @@ struct I2CDDCState {uint8_t edid_blob[128 ]; }; -typedef struct I2CDDCState I2CDDCState ;#define TYPE_I2CDDC "i2c-ddc" -DECLARE_INSTANCE_CHECKER (I2CDDCState,I2CDDC , - TYPE_I2CDDC) +OBJECT_DECLARE_SIMPLE_TYPE(I2CDDCState, I2CDDC)#endif /* I2C_DDC_H */
include/hw/display/macfb.h +1 -3
@@ -32,9 +32,7 @@ typedef struct MacfbState { } MacfbState;#define TYPE_MACFB "sysbus-macfb" -typedef struct MacfbSysBusState MacfbSysBusState ; -DECLARE_INSTANCE_CHECKER (MacfbSysBusState,MACFB , - TYPE_MACFB) +OBJECT_DECLARE_SIMPLE_TYPE(MacfbSysBusState, MACFB)struct MacfbSysBusState {SysBusDevice busdev;
include/hw/display/xlnx_dp.h +1 -3
@@ -103,10 +103,8 @@ struct XlnxDPState {DPCDState *dpcd;I2CDDCState *edid; }; -typedef struct XlnxDPState XlnxDPState ;#define TYPE_XLNX_DP "xlnx.v-dp" -DECLARE_INSTANCE_CHECKER (XlnxDPState,XLNX_DP , - TYPE_XLNX_DP) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxDPState, XLNX_DP)#endif
include/hw/dma/bcm2835_dma.h +1 -3
@@ -26,9 +26,7 @@ typedef struct { } BCM2835DMAChan;#define TYPE_BCM2835_DMA "bcm2835-dma" -typedef struct BCM2835DMAState BCM2835DMAState ; -DECLARE_INSTANCE_CHECKER (BCM2835DMAState,BCM2835_DMA , - TYPE_BCM2835_DMA) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835DMAState, BCM2835_DMA)#define BCM2835_DMA_NCHANS 16
include/hw/dma/i8257.h +1 -3
@@ -6,9 +6,7 @@#include "qom/object.h" #define TYPE_I8257 "i8257" -typedef struct I8257State I8257State ; -DECLARE_INSTANCE_CHECKER (I8257State,I8257 , - TYPE_I8257) +OBJECT_DECLARE_SIMPLE_TYPE(I8257State, I8257) typedef struct I8257Regs { int now[2];
include/hw/dma/pl080.h +1 -3
@@ -43,9 +43,7 @@ typedef struct {#define TYPE_PL080 "pl080"#define TYPE_PL081 "pl081" -typedef struct PL080State PL080State ; -DECLARE_INSTANCE_CHECKER (PL080State,PL080 , - TYPE_PL080) +OBJECT_DECLARE_SIMPLE_TYPE(PL080State, PL080)struct PL080State {SysBusDevice parent_obj;
include/hw/dma/xlnx-zdma.h +1 -3
@@ -76,11 +76,9 @@ struct XlnxZDMA {to model write only mode. */ uint8_t buf[2048 ]; }; -typedef struct XlnxZDMA XlnxZDMA ;#define TYPE_XLNX_ZDMA "xlnx.zdma" -DECLARE_INSTANCE_CHECKER (XlnxZDMA,XLNX_ZDMA , - TYPE_XLNX_ZDMA) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxZDMA, XLNX_ZDMA)#endif /* XLNX_ZDMA_H */
include/hw/dma/xlnx-zynq-devcfg.h +1 -3
@@ -33,9 +33,7 @@#define TYPE_XLNX_ZYNQ_DEVCFG "xlnx.ps7-dev-cfg" -typedef struct XlnxZynqDevcfg XlnxZynqDevcfg ; -DECLARE_INSTANCE_CHECKER (XlnxZynqDevcfg,XLNX_ZYNQ_DEVCFG , - TYPE_XLNX_ZYNQ_DEVCFG) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqDevcfg, XLNX_ZYNQ_DEVCFG)#define XLNX_ZYNQ_DEVCFG_R_MAX (0x100 / 4)
include/hw/dma/xlnx_dpdma.h +1 -3
@@ -43,11 +43,9 @@ struct XlnxDPDMAState {qemu_irq irq; }; -typedef struct XlnxDPDMAState XlnxDPDMAState ;#define TYPE_XLNX_DPDMA "xlnx.dpdma" -DECLARE_INSTANCE_CHECKER (XlnxDPDMAState,XLNX_DPDMA , -TYPE_XLNX_DPDMA ) +OBJECT_DECLARE_SIMPLE_TYPE (XlnxDPDMAState,XLNX_DPDMA )/* * xlnx_dpdma_start_operation: Start the operation on the specified channel. The
include/hw/gpio/bcm2835_gpio.h +1 -3
@@ -33,10 +33,8 @@ struct BCM2835GpioState {uint8_t sd_fsel;qemu_irq out[54 ]; }; -typedef struct BCM2835GpioState BCM2835GpioState ;#define TYPE_BCM2835_GPIO "bcm2835_gpio" -DECLARE_INSTANCE_CHECKER (BCM2835GpioState,BCM2835_GPIO , - TYPE_BCM2835_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835GpioState, BCM2835_GPIO)#endif
include/hw/gpio/imx_gpio.h +1 -3
@@ -24,9 +24,7 @@#include "qom/object.h" #define TYPE_IMX_GPIO "imx.gpio" -typedef struct IMXGPIOState IMXGPIOState ; -DECLARE_INSTANCE_CHECKER (IMXGPIOState,IMX_GPIO , - TYPE_IMX_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(IMXGPIOState, IMX_GPIO)#define IMX_GPIO_MEM_SIZE 0x20
include/hw/gpio/nrf51_gpio.h +1 -3
@@ -29,9 +29,7 @@#include "hw/sysbus.h" #include "qom/object.h" #define TYPE_NRF51_GPIO "nrf51_soc.gpio" -typedef struct NRF51GPIOState NRF51GPIOState ; -DECLARE_INSTANCE_CHECKER (NRF51GPIOState,NRF51_GPIO , - TYPE_NRF51_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(NRF51GPIOState, NRF51_GPIO)#define NRF51_GPIO_PINS 32
include/hw/hyperv/vmbus-bridge.h +1 -3
@@ -23,10 +23,8 @@ struct VMBusBridge {VMBus *bus; }; -typedef struct VMBusBridge VMBusBridge ; -DECLARE_INSTANCE_CHECKER (VMBusBridge,VMBUS_BRIDGE , - TYPE_VMBUS_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(VMBusBridge, VMBUS_BRIDGE)static inline VMBusBridge *vmbus_bridge_find (void ) {
include/hw/hyperv/vmbus.h +1 -3
@@ -24,9 +24,7 @@ OBJECT_DECLARE_TYPE(VMBusDevice, VMBusDeviceClass, VMBUS_DEVICE)#define TYPE_VMBUS "vmbus" -typedef struct VMBus VMBus ; -DECLARE_INSTANCE_CHECKER (VMBus,VMBUS , -TYPE_VMBUS ) +OBJECT_DECLARE_SIMPLE_TYPE (VMBus,VMBUS )/* * Object wrapping a GPADL -- GPA Descriptor List -- an array of guest physical
include/hw/i2c/i2c.h +1 -2
@@ -49,8 +49,7 @@ struct I2CSlave { };#define TYPE_I2C_BUS "i2c-bus" -DECLARE_INSTANCE_CHECKER (I2CBus,I2C_BUS , - TYPE_I2C_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(I2CBus, I2C_BUS)typedef struct I2CNode I2CNode ;
include/hw/i2c/imx_i2c.h +1 -3
@@ -25,9 +25,7 @@#include "qom/object.h" #define TYPE_IMX_I2C "imx.i2c" -typedef struct IMXI2CState IMXI2CState ; -DECLARE_INSTANCE_CHECKER (IMXI2CState,IMX_I2C , - TYPE_IMX_I2C) +OBJECT_DECLARE_SIMPLE_TYPE(IMXI2CState, IMX_I2C)#define IMX_I2C_MEM_SIZE 0x14
include/hw/i2c/microbit_i2c.h +1 -3
@@ -27,9 +27,7 @@#define NRF51_TWI_REG_ADDRESS 0x588#define TYPE_MICROBIT_I2C "microbit.i2c" -typedef struct MicrobitI2CState MicrobitI2CState ; -DECLARE_INSTANCE_CHECKER (MicrobitI2CState,MICROBIT_I2C , - TYPE_MICROBIT_I2C) +OBJECT_DECLARE_SIMPLE_TYPE(MicrobitI2CState, MICROBIT_I2C)#define MICROBIT_I2C_NREGS (NRF51_PERIPHERAL_SIZE / sizeof(uint32_t))
include/hw/i2c/ppc4xx_i2c.h +1 -3
@@ -32,9 +32,7 @@#include "qom/object.h" #define TYPE_PPC4xx_I2C "ppc4xx-i2c" -typedef struct PPC4xxI2CState PPC4xxI2CState ; -DECLARE_INSTANCE_CHECKER (PPC4xxI2CState, PPC4xx_I2C, - TYPE_PPC4xx_I2C) +OBJECT_DECLARE_SIMPLE_TYPE(PPC4xxI2CState, PPC4xx_I2C)struct PPC4xxI2CState {/*< private >*/
include/hw/i386/ich9.h +1 -3
@@ -24,9 +24,7 @@ void ich9_generate_smi(void);#define ICH9_CC_SIZE (16 * 1024)/* 16KB. Chipset configuration registers */ #define TYPE_ICH9_LPC_DEVICE "ICH9-LPC" -typedef struct ICH9LPCState ICH9LPCState ; -DECLARE_INSTANCE_CHECKER (ICH9LPCState,ICH9_LPC_DEVICE , - TYPE_ICH9_LPC_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(ICH9LPCState, ICH9_LPC_DEVICE)struct ICH9LPCState {/* ICH9 LPC PCI to ISA bridge */
include/hw/i386/intel_iommu.h +1 -3
@@ -27,9 +27,7 @@#include "qom/object.h" #define TYPE_INTEL_IOMMU_DEVICE "intel-iommu" -typedef struct IntelIOMMUState IntelIOMMUState ; -DECLARE_INSTANCE_CHECKER (IntelIOMMUState,INTEL_IOMMU_DEVICE , - TYPE_INTEL_IOMMU_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(IntelIOMMUState, INTEL_IOMMU_DEVICE)#define TYPE_INTEL_IOMMU_MEMORY_REGION "intel-iommu-iommu-memory-region"
include/hw/ide/ahci.h +3 -9
@@ -51,19 +51,15 @@ typedef struct AHCIState {AddressSpace *as; } AHCIState; -typedef struct AHCIPCIState AHCIPCIState ;#define TYPE_ICH9_AHCI "ich9-ahci" -DECLARE_INSTANCE_CHECKER (AHCIPCIState,ICH9_AHCI , - TYPE_ICH9_AHCI) +OBJECT_DECLARE_SIMPLE_TYPE(AHCIPCIState, ICH9_AHCI)int32_t ahci_get_num_ports (PCIDevice *dev);void ahci_ide_create_devs (PCIDevice *dev,DriveInfo **hd);#define TYPE_SYSBUS_AHCI "sysbus-ahci" -typedef struct SysbusAHCIState SysbusAHCIState ; -DECLARE_INSTANCE_CHECKER (SysbusAHCIState,SYSBUS_AHCI , - TYPE_SYSBUS_AHCI) +OBJECT_DECLARE_SIMPLE_TYPE(SysbusAHCIState, SYSBUS_AHCI)struct SysbusAHCIState {/*< private >*/
@@ -75,9 +71,7 @@ struct SysbusAHCIState { };#define TYPE_ALLWINNER_AHCI "allwinner-ahci" -typedef struct AllwinnerAHCIState AllwinnerAHCIState ; -DECLARE_INSTANCE_CHECKER (AllwinnerAHCIState,ALLWINNER_AHCI , - TYPE_ALLWINNER_AHCI) +OBJECT_DECLARE_SIMPLE_TYPE(AllwinnerAHCIState, ALLWINNER_AHCI)#define ALLWINNER_AHCI_MMIO_OFF 0x80#define ALLWINNER_AHCI_MMIO_SIZE 0x80
include/hw/ide/internal.h +1 -3
@@ -19,15 +19,13 @@#define USE_DMA_CDROM #include "qom/object.h" -typedef struct IDEBus IDEBus ;typedef struct IDEDevice IDEDevice ;typedef struct IDEState IDEState ;typedef struct IDEDMA IDEDMA ;typedef struct IDEDMAOps IDEDMAOps ;#define TYPE_IDE_BUS "IDE" -DECLARE_INSTANCE_CHECKER (IDEBus,IDE_BUS , - TYPE_IDE_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(IDEBus, IDE_BUS)#define MAX_IDE_DEVS 2
include/hw/ide/pci.h +1 -3
@@ -40,9 +40,7 @@ typedef struct BMDMAState { } BMDMAState;#define TYPE_PCI_IDE "pci-ide" -typedef struct PCIIDEState PCIIDEState ; -DECLARE_INSTANCE_CHECKER (PCIIDEState,PCI_IDE , - TYPE_PCI_IDE) +OBJECT_DECLARE_SIMPLE_TYPE(PCIIDEState, PCI_IDE)struct PCIIDEState {/*< private >*/
include/hw/input/adb.h +1 -3
@@ -33,7 +33,6 @@#define ADB_MAX_OUT_LEN 16 -typedef struct ADBBusState ADBBusState ;typedef struct ADBDevice ADBDevice ;/* buf = NULL means polling */
@@ -65,8 +64,7 @@ struct ADBDeviceClass { };#define TYPE_ADB_BUS "apple-desktop-bus" -DECLARE_INSTANCE_CHECKER (ADBBusState,ADB_BUS , - TYPE_ADB_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(ADBBusState, ADB_BUS)#define ADB_STATUS_BUSTIMEOUT 0x1#define ADB_STATUS_POLLREPLY 0x2
include/hw/input/i8042.h +1 -3
@@ -12,9 +12,7 @@#include "qom/object.h" #define TYPE_I8042 "i8042" -typedef struct ISAKBDState ISAKBDState ; -DECLARE_INSTANCE_CHECKER (ISAKBDState,I8042 , - TYPE_I8042) +OBJECT_DECLARE_SIMPLE_TYPE(ISAKBDState, I8042)#define I8042_A20_LINE "a20"
include/hw/intc/allwinner-a10-pic.h +1 -3
@@ -5,9 +5,7 @@#include "qom/object.h" #define TYPE_AW_A10_PIC "allwinner-a10-pic" -typedef struct AwA10PICState AwA10PICState ; -DECLARE_INSTANCE_CHECKER (AwA10PICState,AW_A10_PIC , - TYPE_AW_A10_PIC) +OBJECT_DECLARE_SIMPLE_TYPE(AwA10PICState, AW_A10_PIC)#define AW_A10_PIC_VECTOR 0#define AW_A10_PIC_BASE_ADDR 4
include/hw/intc/aspeed_vic.h +1 -3
@@ -17,9 +17,7 @@#include "qom/object.h" #define TYPE_ASPEED_VIC "aspeed.vic" -typedef struct AspeedVICState AspeedVICState ; -DECLARE_INSTANCE_CHECKER (AspeedVICState,ASPEED_VIC , - TYPE_ASPEED_VIC) +OBJECT_DECLARE_SIMPLE_TYPE(AspeedVICState, ASPEED_VIC)#define ASPEED_VIC_NR_IRQS 51
include/hw/intc/bcm2835_ic.h +1 -3
@@ -12,9 +12,7 @@#include "qom/object.h" #define TYPE_BCM2835_IC "bcm2835-ic" -typedef struct BCM2835ICState BCM2835ICState ; -DECLARE_INSTANCE_CHECKER (BCM2835ICState,BCM2835_IC , - TYPE_BCM2835_IC) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835ICState, BCM2835_IC)#define BCM2835_IC_GPU_IRQ "gpu-irq"#define BCM2835_IC_ARM_IRQ "arm-irq"
include/hw/intc/bcm2836_control.h +1 -3
@@ -24,9 +24,7 @@#define BCM2836_MBPERCORE 4#define TYPE_BCM2836_CONTROL "bcm2836-control" -typedef struct BCM2836ControlState BCM2836ControlState ; -DECLARE_INSTANCE_CHECKER (BCM2836ControlState,BCM2836_CONTROL , - TYPE_BCM2836_CONTROL) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2836ControlState, BCM2836_CONTROL)struct BCM2836ControlState {/*< private >*/
include/hw/intc/heathrow_pic.h +1 -3
@@ -30,9 +30,7 @@#include "qom/object.h" #define TYPE_HEATHROW "heathrow" -typedef struct HeathrowState HeathrowState ; -DECLARE_INSTANCE_CHECKER (HeathrowState,HEATHROW , - TYPE_HEATHROW) +OBJECT_DECLARE_SIMPLE_TYPE(HeathrowState, HEATHROW) typedef struct HeathrowPICState { uint32_t events;
include/hw/intc/ibex_plic.h +1 -3
@@ -23,9 +23,7 @@#include "qom/object.h" #define TYPE_IBEX_PLIC "ibex-plic" -typedef struct IbexPlicState IbexPlicState ; -DECLARE_INSTANCE_CHECKER (IbexPlicState,IBEX_PLIC , - TYPE_IBEX_PLIC) +OBJECT_DECLARE_SIMPLE_TYPE(IbexPlicState, IBEX_PLIC)struct IbexPlicState {/*< private >*/
include/hw/intc/imx_avic.h +1 -3
@@ -21,9 +21,7 @@#include "qom/object.h" #define TYPE_IMX_AVIC "imx.avic" -typedef struct IMXAVICState IMXAVICState ; -DECLARE_INSTANCE_CHECKER (IMXAVICState,IMX_AVIC , - TYPE_IMX_AVIC) +OBJECT_DECLARE_SIMPLE_TYPE(IMXAVICState, IMX_AVIC)#define IMX_AVIC_NUM_IRQS 64
include/hw/intc/imx_gpcv2.h +1 -3
@@ -16,10 +16,8 @@ struct IMXGPCv2State {MemoryRegion iomem;uint32_t regs[GPC_NUM ]; }; -typedef struct IMXGPCv2State IMXGPCv2State ;#define TYPE_IMX_GPCV2 "imx-gpcv2" -DECLARE_INSTANCE_CHECKER (IMXGPCv2State,IMX_GPCV2 , - TYPE_IMX_GPCV2) +OBJECT_DECLARE_SIMPLE_TYPE(IMXGPCv2State, IMX_GPCV2)#endif /* IMX_GPCV2_H */
include/hw/intc/mips_gic.h +1 -3
@@ -171,9 +171,7 @@#define GIC_LOCAL_INT_WD 0/* GIC watchdog */ #define TYPE_MIPS_GIC "mips-gic" -typedef struct MIPSGICState MIPSGICState ; -DECLARE_INSTANCE_CHECKER (MIPSGICState,MIPS_GIC , -TYPE_MIPS_GIC ) +OBJECT_DECLARE_SIMPLE_TYPE (MIPSGICState,MIPS_GIC ) /* Support up to 32 VPs and 256 IRQs */#define GIC_MAX_VPS 32
include/hw/intc/realview_gic.h +1 -3
@@ -15,9 +15,7 @@#include "qom/object.h" #define TYPE_REALVIEW_GIC "realview_gic" -typedef struct RealViewGICState RealViewGICState ; -DECLARE_INSTANCE_CHECKER (RealViewGICState,REALVIEW_GIC , - TYPE_REALVIEW_GIC) +OBJECT_DECLARE_SIMPLE_TYPE(RealViewGICState, REALVIEW_GIC)struct RealViewGICState {SysBusDevice parent_obj;
include/hw/intc/rx_icu.h +1 -3
@@ -69,10 +69,8 @@ struct RXICUState {qemu_irq _fir;qemu_irq _swi; }; -typedef struct RXICUState RXICUState ;#define TYPE_RX_ICU "rx-icu" -DECLARE_INSTANCE_CHECKER (RXICUState,RX_ICU , - TYPE_RX_ICU) +OBJECT_DECLARE_SIMPLE_TYPE(RXICUState, RX_ICU)#endif /* RX_ICU_H */
include/hw/intc/xlnx-pmu-iomod-intc.h +1 -3
@@ -31,9 +31,7 @@#define TYPE_XLNX_PMU_IO_INTC "xlnx.pmu_io_intc" -typedef struct XlnxPMUIOIntc XlnxPMUIOIntc ; -DECLARE_INSTANCE_CHECKER (XlnxPMUIOIntc,XLNX_PMU_IO_INTC , -TYPE_XLNX_PMU_IO_INTC ) +OBJECT_DECLARE_SIMPLE_TYPE (XlnxPMUIOIntc,XLNX_PMU_IO_INTC ) /* This is R_PIT3_CONTROL + 1 */#define XLNXPMUIOINTC_R_MAX (0x78 + 1)
include/hw/intc/xlnx-zynqmp-ipi.h +1 -3
@@ -31,9 +31,7 @@#define TYPE_XLNX_ZYNQMP_IPI "xlnx.zynqmp_ipi" -typedef struct XlnxZynqMPIPI XlnxZynqMPIPI ; -DECLARE_INSTANCE_CHECKER (XlnxZynqMPIPI,XLNX_ZYNQMP_IPI , -TYPE_XLNX_ZYNQMP_IPI ) +OBJECT_DECLARE_SIMPLE_TYPE (XlnxZynqMPIPI,XLNX_ZYNQMP_IPI ) /* This is R_IPI_IDR + 1 */#define R_XLNX_ZYNQMP_IPI_MAX ((0x1c / 4) + 1)
include/hw/ipack/ipack.h +1 -3
@@ -14,11 +14,9 @@#include "hw/qdev-core.h" #include "qom/object.h" -typedef struct IPackBus IPackBus ;#define TYPE_IPACK_BUS "IndustryPack" -DECLARE_INSTANCE_CHECKER (IPackBus,IPACK_BUS , - TYPE_IPACK_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(IPackBus, IPACK_BUS)struct IPackBus {/*< private >*/
include/hw/ipmi/ipmi.h +1 -3
@@ -264,9 +264,7 @@ int ipmi_bmc_sdr_find(IPMIBmc *b, uint16_t recid,void ipmi_bmc_gen_event (IPMIBmc *b,uint8_t *evt,bool log);#define TYPE_IPMI_BMC_SIMULATOR "ipmi-bmc-sim" -typedef struct IPMIBmcSim IPMIBmcSim ; -DECLARE_INSTANCE_CHECKER (IPMIBmcSim,IPMI_BMC_SIMULATOR , - TYPE_IPMI_BMC_SIMULATOR) +OBJECT_DECLARE_SIMPLE_TYPE(IPMIBmcSim, IPMI_BMC_SIMULATOR) typedef struct RspBuffer {
include/hw/isa/isa.h +1 -2
@@ -14,8 +14,7 @@ OBJECT_DECLARE_TYPE(ISADevice, ISADeviceClass, ISA_DEVICE)#define TYPE_ISA_BUS "ISA" -DECLARE_INSTANCE_CHECKER (ISABus,ISA_BUS , - TYPE_ISA_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(ISABus, ISA_BUS)#define TYPE_APPLE_SMC "isa-applesmc"#define APPLESMC_MAX_DATA_LENGTH 32
include/hw/isa/pc87312.h +1 -3
@@ -30,9 +30,7 @@#define TYPE_PC87312 "pc87312" -typedef struct PC87312State PC87312State ; -DECLARE_INSTANCE_CHECKER (PC87312State,PC87312 , - TYPE_PC87312) +OBJECT_DECLARE_SIMPLE_TYPE(PC87312State, PC87312)struct PC87312State {/*< private >*/
include/hw/m68k/mcf_fec.h +1 -3
@@ -12,9 +12,7 @@#include "qom/object.h" #define TYPE_MCF_FEC_NET "mcf-fec" -typedef struct mcf_fec_state mcf_fec_state ; -DECLARE_INSTANCE_CHECKER (mcf_fec_state,MCF_FEC_NET , - TYPE_MCF_FEC_NET) +OBJECT_DECLARE_SIMPLE_TYPE(mcf_fec_state, MCF_FEC_NET)#define FEC_NUM_IRQ 13
include/hw/mips/cps.h +1 -3
@@ -29,9 +29,7 @@#include "qom/object.h" #define TYPE_MIPS_CPS "mips-cps" -typedef struct MIPSCPSState MIPSCPSState ; -DECLARE_INSTANCE_CHECKER (MIPSCPSState,MIPS_CPS , - TYPE_MIPS_CPS) +OBJECT_DECLARE_SIMPLE_TYPE(MIPSCPSState, MIPS_CPS)struct MIPSCPSState {SysBusDevice parent_obj;
include/hw/misc/a9scu.h +1 -3
@@ -25,10 +25,8 @@ struct A9SCUState {uint32_t status;uint32_t num_cpu; }; -typedef struct A9SCUState A9SCUState ;#define TYPE_A9_SCU "a9-scu" -DECLARE_INSTANCE_CHECKER (A9SCUState,A9_SCU , - TYPE_A9_SCU) +OBJECT_DECLARE_SIMPLE_TYPE(A9SCUState, A9_SCU)#endif
include/hw/misc/allwinner-cpucfg.h +1 -3
@@ -29,9 +29,7 @@*/ #define TYPE_AW_CPUCFG "allwinner-cpucfg" -typedef struct AwCpuCfgState AwCpuCfgState ; -DECLARE_INSTANCE_CHECKER (AwCpuCfgState,AW_CPUCFG , -TYPE_AW_CPUCFG ) +OBJECT_DECLARE_SIMPLE_TYPE (AwCpuCfgState,AW_CPUCFG )/** @} */
include/hw/misc/allwinner-h3-ccu.h +1 -3
@@ -42,9 +42,7 @@*/ #define TYPE_AW_H3_CCU "allwinner-h3-ccu" -typedef struct AwH3ClockCtlState AwH3ClockCtlState ; -DECLARE_INSTANCE_CHECKER (AwH3ClockCtlState,AW_H3_CCU , -TYPE_AW_H3_CCU ) +OBJECT_DECLARE_SIMPLE_TYPE (AwH3ClockCtlState,AW_H3_CCU )/** @} */
include/hw/misc/allwinner-h3-dramc.h +1 -3
@@ -58,9 +58,7 @@*/ #define TYPE_AW_H3_DRAMC "allwinner-h3-dramc" -typedef struct AwH3DramCtlState AwH3DramCtlState ; -DECLARE_INSTANCE_CHECKER (AwH3DramCtlState,AW_H3_DRAMC , -TYPE_AW_H3_DRAMC ) +OBJECT_DECLARE_SIMPLE_TYPE (AwH3DramCtlState,AW_H3_DRAMC )/** @} */
include/hw/misc/allwinner-h3-sysctrl.h +1 -3
@@ -43,9 +43,7 @@*/ #define TYPE_AW_H3_SYSCTRL "allwinner-h3-sysctrl" -typedef struct AwH3SysCtrlState AwH3SysCtrlState ; -DECLARE_INSTANCE_CHECKER (AwH3SysCtrlState,AW_H3_SYSCTRL , -TYPE_AW_H3_SYSCTRL ) +OBJECT_DECLARE_SIMPLE_TYPE (AwH3SysCtrlState,AW_H3_SYSCTRL )/** @} */
include/hw/misc/allwinner-sid.h +1 -3
@@ -30,9 +30,7 @@*/ #define TYPE_AW_SID "allwinner-sid" -typedef struct AwSidState AwSidState ; -DECLARE_INSTANCE_CHECKER (AwSidState,AW_SID , -TYPE_AW_SID ) +OBJECT_DECLARE_SIMPLE_TYPE (AwSidState,AW_SID )/** @} */
include/hw/misc/arm11scu.h +1 -3
@@ -15,9 +15,7 @@#include "qom/object.h" #define TYPE_ARM11_SCU "arm11-scu" -typedef struct ARM11SCUState ARM11SCUState ; -DECLARE_INSTANCE_CHECKER (ARM11SCUState,ARM11_SCU , - TYPE_ARM11_SCU) +OBJECT_DECLARE_SIMPLE_TYPE(ARM11SCUState, ARM11_SCU)struct ARM11SCUState {/*< private >*/
include/hw/misc/armsse-cpuid.h +1 -3
@@ -26,9 +26,7 @@#include "qom/object.h" #define TYPE_ARMSSE_CPUID "armsse-cpuid" -typedef struct ARMSSECPUID ARMSSECPUID ; -DECLARE_INSTANCE_CHECKER (ARMSSECPUID ,ARMSSE_CPUID , - TYPE_ARMSSE_CPUID) +OBJECT_DECLARE_SIMPLE_TYPE(ARMSSECPUID, ARMSSE_CPUID)struct ARMSSECPUID {/*< private >*/
include/hw/misc/armsse-mhu.h +1 -3
@@ -27,9 +27,7 @@#include "qom/object.h" #define TYPE_ARMSSE_MHU "armsse-mhu" -typedef struct ARMSSEMHU ARMSSEMHU ; -DECLARE_INSTANCE_CHECKER (ARMSSEMHU ,ARMSSE_MHU , - TYPE_ARMSSE_MHU) +OBJECT_DECLARE_SIMPLE_TYPE(ARMSSEMHU, ARMSSE_MHU)struct ARMSSEMHU {/*< private >*/
include/hw/misc/aspeed_xdma.h +1 -3
@@ -13,9 +13,7 @@#include "qom/object.h" #define TYPE_ASPEED_XDMA "aspeed.xdma" -typedef struct AspeedXDMAState AspeedXDMAState ; -DECLARE_INSTANCE_CHECKER (AspeedXDMAState,ASPEED_XDMA , - TYPE_ASPEED_XDMA) +OBJECT_DECLARE_SIMPLE_TYPE(AspeedXDMAState, ASPEED_XDMA)#define ASPEED_XDMA_NUM_REGS (ASPEED_XDMA_REG_SIZE / sizeof(uint32_t))#define ASPEED_XDMA_REG_SIZE 0x7C
include/hw/misc/auxbus.h +3 -8
@@ -29,15 +29,12 @@#include "hw/qdev-core.h" #include "qom/object.h" -typedef struct AUXBus AUXBus ;typedef struct AUXSlave AUXSlave ;typedef enum AUXCommand AUXCommand ;typedef enum AUXReply AUXReply ;#define TYPE_AUXTOI2C "aux-to-i2c-bridge" -typedef struct AUXTOI2CState AUXTOI2CState ; -DECLARE_INSTANCE_CHECKER (AUXTOI2CState,AUXTOI2C , - TYPE_AUXTOI2C) +OBJECT_DECLARE_SIMPLE_TYPE(AUXTOI2CState, AUXTOI2C)enum AUXCommand {WRITE_I2C =0 ,
@@ -58,8 +55,7 @@ enum AUXReply { };#define TYPE_AUX_BUS "aux-bus" -DECLARE_INSTANCE_CHECKER (AUXBus,AUX_BUS , - TYPE_AUX_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(AUXBus, AUX_BUS)struct AUXBus {/* < private > */
@@ -78,8 +74,7 @@ struct AUXBus { };#define TYPE_AUX_SLAVE "aux-slave" -DECLARE_INSTANCE_CHECKER (AUXSlave,AUX_SLAVE , - TYPE_AUX_SLAVE) +OBJECT_DECLARE_SIMPLE_TYPE(AUXSlave, AUX_SLAVE)struct AUXSlave {/* < private > */
include/hw/misc/avr_power.h +1 -3
@@ -31,9 +31,7 @@#define TYPE_AVR_MASK "avr-power" -typedef struct AVRMaskState AVRMaskState ; -DECLARE_INSTANCE_CHECKER (AVRMaskState,AVR_MASK , - TYPE_AVR_MASK) +OBJECT_DECLARE_SIMPLE_TYPE(AVRMaskState, AVR_MASK)struct AVRMaskState {/* <private> */
include/hw/misc/bcm2835_mbox.h +1 -3
@@ -13,9 +13,7 @@#include "qom/object.h" #define TYPE_BCM2835_MBOX "bcm2835-mbox" -typedef struct BCM2835MboxState BCM2835MboxState ; -DECLARE_INSTANCE_CHECKER (BCM2835MboxState,BCM2835_MBOX , - TYPE_BCM2835_MBOX) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835MboxState, BCM2835_MBOX) typedef struct { uint32_t reg[MBOX_SIZE];
include/hw/misc/bcm2835_mphi.h +1 -2
@@ -39,7 +39,6 @@ struct BCM2835MphiState {#define TYPE_BCM2835_MPHI "bcm2835-mphi" -DECLARE_INSTANCE_CHECKER (BCM2835MphiState,BCM2835_MPHI , - TYPE_BCM2835_MPHI) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835MphiState, BCM2835_MPHI)#endif
include/hw/misc/bcm2835_property.h +1 -3
@@ -14,9 +14,7 @@#include "qom/object.h" #define TYPE_BCM2835_PROPERTY "bcm2835-property" -typedef struct BCM2835PropertyState BCM2835PropertyState ; -DECLARE_INSTANCE_CHECKER (BCM2835PropertyState,BCM2835_PROPERTY , - TYPE_BCM2835_PROPERTY) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835PropertyState, BCM2835_PROPERTY)struct BCM2835PropertyState {/*< private >*/
include/hw/misc/bcm2835_rng.h +1 -3
@@ -14,9 +14,7 @@#include "qom/object.h" #define TYPE_BCM2835_RNG "bcm2835-rng" -typedef struct BCM2835RngState BCM2835RngState ; -DECLARE_INSTANCE_CHECKER (BCM2835RngState,BCM2835_RNG , - TYPE_BCM2835_RNG) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835RngState, BCM2835_RNG)struct BCM2835RngState {SysBusDevice busdev;
include/hw/misc/bcm2835_thermal.h +1 -3
@@ -14,9 +14,7 @@#define TYPE_BCM2835_THERMAL "bcm2835-thermal" -typedef struct Bcm2835ThermalState Bcm2835ThermalState ; -DECLARE_INSTANCE_CHECKER (Bcm2835ThermalState,BCM2835_THERMAL , - TYPE_BCM2835_THERMAL) +OBJECT_DECLARE_SIMPLE_TYPE(Bcm2835ThermalState, BCM2835_THERMAL)struct Bcm2835ThermalState {/*< private >*/
include/hw/misc/grlib_ahb_apb_pnp.h +2 -6
@@ -26,14 +26,10 @@#include "qom/object.h" #define TYPE_GRLIB_AHB_PNP "grlib,ahbpnp" -typedef struct AHBPnp AHBPnp ; -DECLARE_INSTANCE_CHECKER (AHBPnp,GRLIB_AHB_PNP , - TYPE_GRLIB_AHB_PNP) +OBJECT_DECLARE_SIMPLE_TYPE(AHBPnp, GRLIB_AHB_PNP)#define TYPE_GRLIB_APB_PNP "grlib,apbpnp" -typedef struct APBPnp APBPnp ; -DECLARE_INSTANCE_CHECKER (APBPnp,GRLIB_APB_PNP , - TYPE_GRLIB_APB_PNP) +OBJECT_DECLARE_SIMPLE_TYPE(APBPnp, GRLIB_APB_PNP) void grlib_ahb_pnp_add_entry(AHBPnp *dev, uint32_t address, uint32_t mask, uint8_t vendor, uint16_t device, int slave,
include/hw/misc/imx25_ccm.h +1 -3
@@ -64,9 +64,7 @@ CCTL_##name##_SHIFT) #define TYPE_IMX25_CCM "imx25.ccm" -typedef struct IMX25CCMState IMX25CCMState ; -DECLARE_INSTANCE_CHECKER (IMX25CCMState,IMX25_CCM , - TYPE_IMX25_CCM) +OBJECT_DECLARE_SIMPLE_TYPE(IMX25CCMState, IMX25_CCM) struct IMX25CCMState {/* <private> */
include/hw/misc/imx31_ccm.h +1 -3
@@ -73,9 +73,7 @@ PDR0_##name##_PODF_SHIFT) #define TYPE_IMX31_CCM "imx31.ccm" -typedef struct IMX31CCMState IMX31CCMState ; -DECLARE_INSTANCE_CHECKER (IMX31CCMState,IMX31_CCM , - TYPE_IMX31_CCM) +OBJECT_DECLARE_SIMPLE_TYPE(IMX31CCMState, IMX31_CCM) struct IMX31CCMState {/* <private> */
include/hw/misc/imx6_ccm.h +1 -3
@@ -179,9 +179,7 @@#define EXTRACT (value, name) extract32(value, name##_SHIFT, name##_LENGTH)#define TYPE_IMX6_CCM "imx6.ccm" -typedef struct IMX6CCMState IMX6CCMState ; -DECLARE_INSTANCE_CHECKER (IMX6CCMState,IMX6_CCM , - TYPE_IMX6_CCM) +OBJECT_DECLARE_SIMPLE_TYPE(IMX6CCMState, IMX6_CCM)struct IMX6CCMState {/* <private> */
include/hw/misc/imx6_src.h +1 -3
@@ -58,9 +58,7 @@#define EXTRACT (value, name) extract32(value, name##_SHIFT, name##_LENGTH)#define TYPE_IMX6_SRC "imx6.src" -typedef struct IMX6SRCState IMX6SRCState ; -DECLARE_INSTANCE_CHECKER (IMX6SRCState,IMX6_SRC , - TYPE_IMX6_SRC) +OBJECT_DECLARE_SIMPLE_TYPE(IMX6SRCState, IMX6_SRC)struct IMX6SRCState {/* <private> */
include/hw/misc/imx6ul_ccm.h +1 -3
@@ -208,9 +208,7 @@#define CCM_ANALOG_PLL_LOCK (1 << 31);#define TYPE_IMX6UL_CCM "imx6ul.ccm" -typedef struct IMX6ULCCMState IMX6ULCCMState ; -DECLARE_INSTANCE_CHECKER (IMX6ULCCMState,IMX6UL_CCM , - TYPE_IMX6UL_CCM) +OBJECT_DECLARE_SIMPLE_TYPE(IMX6ULCCMState, IMX6UL_CCM)struct IMX6ULCCMState {/* <private> */
include/hw/misc/imx7_ccm.h +2 -6
@@ -105,9 +105,7 @@ enum IMX7PMURegisters { };#define TYPE_IMX7_CCM "imx7.ccm" -typedef struct IMX7CCMState IMX7CCMState ; -DECLARE_INSTANCE_CHECKER (IMX7CCMState,IMX7_CCM , - TYPE_IMX7_CCM) +OBJECT_DECLARE_SIMPLE_TYPE(IMX7CCMState, IMX7_CCM)struct IMX7CCMState {/* <private> */
@@ -121,9 +119,7 @@ struct IMX7CCMState {#define TYPE_IMX7_ANALOG "imx7.analog" -typedef struct IMX7AnalogState IMX7AnalogState ; -DECLARE_INSTANCE_CHECKER (IMX7AnalogState,IMX7_ANALOG , - TYPE_IMX7_ANALOG) +OBJECT_DECLARE_SIMPLE_TYPE(IMX7AnalogState, IMX7_ANALOG)struct IMX7AnalogState {/* <private> */
include/hw/misc/imx7_gpr.h +1 -3
@@ -17,9 +17,7 @@#include "qom/object.h" #define TYPE_IMX7_GPR "imx7.gpr" -typedef struct IMX7GPRState IMX7GPRState ; -DECLARE_INSTANCE_CHECKER (IMX7GPRState,IMX7_GPR , - TYPE_IMX7_GPR) +OBJECT_DECLARE_SIMPLE_TYPE(IMX7GPRState, IMX7_GPR)struct IMX7GPRState {/* <private> */
include/hw/misc/imx7_snvs.h +1 -3
@@ -24,9 +24,7 @@ enum IMX7SNVSRegisters { };#define TYPE_IMX7_SNVS "imx7.snvs" -typedef struct IMX7SNVSState IMX7SNVSState ; -DECLARE_INSTANCE_CHECKER (IMX7SNVSState,IMX7_SNVS , - TYPE_IMX7_SNVS) +OBJECT_DECLARE_SIMPLE_TYPE(IMX7SNVSState, IMX7_SNVS)struct IMX7SNVSState {/* <private> */
include/hw/misc/imx_rngc.h +1 -3
@@ -14,9 +14,7 @@#include "qom/object.h" #define TYPE_IMX_RNGC "imx.rngc" -typedef struct IMXRNGCState IMXRNGCState ; -DECLARE_INSTANCE_CHECKER (IMXRNGCState,IMX_RNGC , - TYPE_IMX_RNGC) +OBJECT_DECLARE_SIMPLE_TYPE(IMXRNGCState, IMX_RNGC)struct IMXRNGCState {/*< private >*/
include/hw/misc/iotkit-secctl.h +1 -3
@@ -59,9 +59,7 @@#include "qom/object.h" #define TYPE_IOTKIT_SECCTL "iotkit-secctl" -typedef struct IoTKitSecCtl IoTKitSecCtl ; -DECLARE_INSTANCE_CHECKER (IoTKitSecCtl,IOTKIT_SECCTL , - TYPE_IOTKIT_SECCTL) +OBJECT_DECLARE_SIMPLE_TYPE(IoTKitSecCtl, IOTKIT_SECCTL)#define IOTS_APB_PPC0_NUM_PORTS 3#define IOTS_APB_PPC1_NUM_PORTS 1
include/hw/misc/iotkit-sysctl.h +1 -3
@@ -31,9 +31,7 @@#include "qom/object.h" #define TYPE_IOTKIT_SYSCTL "iotkit-sysctl" -typedef struct IoTKitSysCtl IoTKitSysCtl ; -DECLARE_INSTANCE_CHECKER (IoTKitSysCtl,IOTKIT_SYSCTL , - TYPE_IOTKIT_SYSCTL) +OBJECT_DECLARE_SIMPLE_TYPE(IoTKitSysCtl, IOTKIT_SYSCTL)struct IoTKitSysCtl {/*< private >*/
include/hw/misc/iotkit-sysinfo.h +1 -3
@@ -26,9 +26,7 @@#include "qom/object.h" #define TYPE_IOTKIT_SYSINFO "iotkit-sysinfo" -typedef struct IoTKitSysInfo IoTKitSysInfo ; -DECLARE_INSTANCE_CHECKER (IoTKitSysInfo,IOTKIT_SYSINFO , - TYPE_IOTKIT_SYSINFO) +OBJECT_DECLARE_SIMPLE_TYPE(IoTKitSysInfo, IOTKIT_SYSINFO)struct IoTKitSysInfo {/*< private >*/
include/hw/misc/mac_via.h +3 -9
@@ -32,9 +32,7 @@#define TYPE_MOS6522_Q800_VIA1 "mos6522-q800-via1" -typedef struct MOS6522Q800VIA1State MOS6522Q800VIA1State ; -DECLARE_INSTANCE_CHECKER (MOS6522Q800VIA1State,MOS6522_Q800_VIA1 , - TYPE_MOS6522_Q800_VIA1) +OBJECT_DECLARE_SIMPLE_TYPE(MOS6522Q800VIA1State, MOS6522_Q800_VIA1)struct MOS6522Q800VIA1State {/*< private >*/
@@ -68,9 +66,7 @@ struct MOS6522Q800VIA1State {#define VIA2_IRQ_ASC (1 << VIA2_IRQ_ASC_BIT)#define TYPE_MOS6522_Q800_VIA2 "mos6522-q800-via2" -typedef struct MOS6522Q800VIA2State MOS6522Q800VIA2State ; -DECLARE_INSTANCE_CHECKER (MOS6522Q800VIA2State,MOS6522_Q800_VIA2 , - TYPE_MOS6522_Q800_VIA2) +OBJECT_DECLARE_SIMPLE_TYPE(MOS6522Q800VIA2State, MOS6522_Q800_VIA2)struct MOS6522Q800VIA2State {/*< private >*/
@@ -79,9 +75,7 @@ struct MOS6522Q800VIA2State {#define TYPE_MAC_VIA "mac_via" -typedef struct MacVIAState MacVIAState ; -DECLARE_INSTANCE_CHECKER (MacVIAState,MAC_VIA , - TYPE_MAC_VIA) +OBJECT_DECLARE_SIMPLE_TYPE(MacVIAState, MAC_VIA)struct MacVIAState {SysBusDevice busdev;
include/hw/misc/macio/cuda.h +2 -6
@@ -63,17 +63,13 @@ struct MOS6522CUDAState {/*< private >*/ MOS6522State parent_obj; }; -typedef struct MOS6522CUDAState MOS6522CUDAState ;#define TYPE_MOS6522_CUDA "mos6522-cuda" -DECLARE_INSTANCE_CHECKER (MOS6522CUDAState,MOS6522_CUDA , -TYPE_MOS6522_CUDA ) +OBJECT_DECLARE_SIMPLE_TYPE (MOS6522CUDAState,MOS6522_CUDA ) /* Cuda */#define TYPE_CUDA "cuda" -typedef struct CUDAState CUDAState ; -DECLARE_INSTANCE_CHECKER (CUDAState,CUDA , - TYPE_CUDA) +OBJECT_DECLARE_SIMPLE_TYPE(CUDAState, CUDA)struct CUDAState {/*< private >*/
include/hw/misc/macio/gpio.h +1 -3
@@ -31,9 +31,7 @@#include "qom/object.h" #define TYPE_MACIO_GPIO "macio-gpio" -typedef struct MacIOGPIOState MacIOGPIOState ; -DECLARE_INSTANCE_CHECKER (MacIOGPIOState,MACIO_GPIO , - TYPE_MACIO_GPIO) +OBJECT_DECLARE_SIMPLE_TYPE(MacIOGPIOState, MACIO_GPIO)struct MacIOGPIOState {/*< private >*/
include/hw/misc/macio/macio.h +5 -15
@@ -40,9 +40,7 @@/* MacIO virtual bus */ #define TYPE_MACIO_BUS "macio-bus" -typedef struct MacIOBusState MacIOBusState ; -DECLARE_INSTANCE_CHECKER (MacIOBusState,MACIO_BUS , - TYPE_MACIO_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(MacIOBusState, MACIO_BUS)struct MacIOBusState {/*< private >*/
@@ -51,9 +49,7 @@ struct MacIOBusState {/* MacIO IDE */ #define TYPE_MACIO_IDE "macio-ide" -typedef struct MACIOIDEState MACIOIDEState ; -DECLARE_INSTANCE_CHECKER (MACIOIDEState,MACIO_IDE , - TYPE_MACIO_IDE) +OBJECT_DECLARE_SIMPLE_TYPE(MACIOIDEState, MACIO_IDE)struct MACIOIDEState {/*< private >*/
@@ -79,9 +75,7 @@ void macio_ide_init_drives(MACIOIDEState *ide, DriveInfo **hd_table);void macio_ide_register_dma (MACIOIDEState *ide);#define TYPE_MACIO "macio" -typedef struct MacIOState MacIOState ; -DECLARE_INSTANCE_CHECKER (MacIOState,MACIO , - TYPE_MACIO) +OBJECT_DECLARE_SIMPLE_TYPE(MacIOState, MACIO)struct MacIOState {/*< private >*/
@@ -98,9 +92,7 @@ struct MacIOState { };#define TYPE_OLDWORLD_MACIO "macio-oldworld" -typedef struct OldWorldMacIOState OldWorldMacIOState ; -DECLARE_INSTANCE_CHECKER (OldWorldMacIOState,OLDWORLD_MACIO , - TYPE_OLDWORLD_MACIO) +OBJECT_DECLARE_SIMPLE_TYPE(OldWorldMacIOState, OLDWORLD_MACIO)struct OldWorldMacIOState {/*< private >*/
@@ -114,9 +106,7 @@ struct OldWorldMacIOState { };#define TYPE_NEWWORLD_MACIO "macio-newworld" -typedef struct NewWorldMacIOState NewWorldMacIOState ; -DECLARE_INSTANCE_CHECKER (NewWorldMacIOState,NEWWORLD_MACIO , - TYPE_NEWWORLD_MACIO) +OBJECT_DECLARE_SIMPLE_TYPE(NewWorldMacIOState, NEWWORLD_MACIO)struct NewWorldMacIOState {/*< private >*/
include/hw/misc/macio/pmu.h +2 -6
@@ -178,11 +178,9 @@ struct MOS6522PMUState {/*< private >*/ MOS6522State parent_obj; }; -typedef struct MOS6522PMUState MOS6522PMUState ;#define TYPE_MOS6522_PMU "mos6522-pmu" -DECLARE_INSTANCE_CHECKER (MOS6522PMUState,MOS6522_PMU , -TYPE_MOS6522_PMU ) +OBJECT_DECLARE_SIMPLE_TYPE (MOS6522PMUState,MOS6522_PMU )/** * PMUState: * @last_b: last value of B register
@@ -231,10 +229,8 @@ struct PMUState {/* GPIO */ MacIOGPIOState *gpio; }; -typedef struct PMUState PMUState ;#define TYPE_VIA_PMU "via-pmu" -DECLARE_INSTANCE_CHECKER (PMUState,VIA_PMU , - TYPE_VIA_PMU) +OBJECT_DECLARE_SIMPLE_TYPE(PMUState, VIA_PMU)#endif /* PMU_H */
include/hw/misc/max111x.h +1 -3
@@ -45,12 +45,10 @@ struct MAX111xState {uint8_t input[8 ];int inputs, com; }; -typedef struct MAX111xState MAX111xState ;#define TYPE_MAX_111X "max111x" -DECLARE_INSTANCE_CHECKER (MAX111xState,MAX_111X , - TYPE_MAX_111X) +OBJECT_DECLARE_SIMPLE_TYPE(MAX111xState, MAX_111X)#define TYPE_MAX_1110 "max1110"#define TYPE_MAX_1111 "max1111"
include/hw/misc/mips_cmgcr.h +1 -3
@@ -14,9 +14,7 @@#include "qom/object.h" #define TYPE_MIPS_GCR "mips-gcr" -typedef struct MIPSGCRState MIPSGCRState ; -DECLARE_INSTANCE_CHECKER (MIPSGCRState,MIPS_GCR , - TYPE_MIPS_GCR) +OBJECT_DECLARE_SIMPLE_TYPE(MIPSGCRState, MIPS_GCR)#define GCR_BASE_ADDR 0x1fbf8000ULL#define GCR_ADDRSPACE_SZ 0x8000
include/hw/misc/mips_cpc.h +1 -3
@@ -35,9 +35,7 @@#define CPC_VP_RUNNING_OFS 0x30#define TYPE_MIPS_CPC "mips-cpc" -typedef struct MIPSCPCState MIPSCPCState ; -DECLARE_INSTANCE_CHECKER (MIPSCPCState,MIPS_CPC , - TYPE_MIPS_CPC) +OBJECT_DECLARE_SIMPLE_TYPE(MIPSCPCState, MIPS_CPC)struct MIPSCPCState {SysBusDevice parent_obj;
include/hw/misc/mips_itu.h +1 -3
@@ -24,9 +24,7 @@#include "qom/object.h" #define TYPE_MIPS_ITU "mips-itu" -typedef struct MIPSITUState MIPSITUState ; -DECLARE_INSTANCE_CHECKER (MIPSITUState,MIPS_ITU , - TYPE_MIPS_ITU) +OBJECT_DECLARE_SIMPLE_TYPE(MIPSITUState, MIPS_ITU)#define ITC_CELL_DEPTH_SHIFT 2#define ITC_CELL_DEPTH (1u << ITC_CELL_DEPTH_SHIFT)
include/hw/misc/mps2-fpgaio.h +1 -3
@@ -25,9 +25,7 @@#include "qom/object.h" #define TYPE_MPS2_FPGAIO "mps2-fpgaio" -typedef struct MPS2FPGAIO MPS2FPGAIO ; -DECLARE_INSTANCE_CHECKER (MPS2FPGAIO ,MPS2_FPGAIO , - TYPE_MPS2_FPGAIO) +OBJECT_DECLARE_SIMPLE_TYPE(MPS2FPGAIO, MPS2_FPGAIO)struct MPS2FPGAIO {/*< private >*/
include/hw/misc/mps2-scc.h +1 -3
@@ -16,9 +16,7 @@#include "qom/object.h" #define TYPE_MPS2_SCC "mps2-scc" -typedef struct MPS2SCC MPS2SCC ; -DECLARE_INSTANCE_CHECKER (MPS2SCC ,MPS2_SCC , - TYPE_MPS2_SCC) +OBJECT_DECLARE_SIMPLE_TYPE(MPS2SCC, MPS2_SCC)#define NUM_OSCCLK 3
include/hw/misc/msf2-sysreg.h +1 -3
@@ -62,9 +62,7 @@ enum {#define MSF2_SYSREG_MMIO_SIZE 0x300#define TYPE_MSF2_SYSREG "msf2-sysreg" -typedef struct MSF2SysregState MSF2SysregState ; -DECLARE_INSTANCE_CHECKER (MSF2SysregState,MSF2_SYSREG , - TYPE_MSF2_SYSREG) +OBJECT_DECLARE_SIMPLE_TYPE(MSF2SysregState, MSF2_SYSREG)struct MSF2SysregState {SysBusDevice parent_obj;
include/hw/misc/nrf51_rng.h +1 -3
@@ -38,9 +38,7 @@#include "qemu/timer.h" #include "qom/object.h" #define TYPE_NRF51_RNG "nrf51_soc.rng" -typedef struct NRF51RNGState NRF51RNGState ; -DECLARE_INSTANCE_CHECKER (NRF51RNGState,NRF51_RNG , - TYPE_NRF51_RNG) +OBJECT_DECLARE_SIMPLE_TYPE(NRF51RNGState, NRF51_RNG)#define NRF51_RNG_SIZE 0x1000
include/hw/misc/stm32f2xx_syscfg.h +1 -3
@@ -37,9 +37,7 @@#define SYSCFG_CMPCR 0x20#define TYPE_STM32F2XX_SYSCFG "stm32f2xx-syscfg" -typedef struct STM32F2XXSyscfgState STM32F2XXSyscfgState ; -DECLARE_INSTANCE_CHECKER (STM32F2XXSyscfgState,STM32F2XX_SYSCFG , - TYPE_STM32F2XX_SYSCFG) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F2XXSyscfgState, STM32F2XX_SYSCFG)struct STM32F2XXSyscfgState {/* <private> */
include/hw/misc/stm32f4xx_exti.h +1 -3
@@ -37,9 +37,7 @@#define EXTI_PR 0x14#define TYPE_STM32F4XX_EXTI "stm32f4xx-exti" -typedef struct STM32F4xxExtiState STM32F4xxExtiState ; -DECLARE_INSTANCE_CHECKER (STM32F4xxExtiState,STM32F4XX_EXTI , - TYPE_STM32F4XX_EXTI) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F4xxExtiState, STM32F4XX_EXTI)#define NUM_GPIO_EVENT_IN_LINES 16#define NUM_INTERRUPT_OUT_LINES 16
include/hw/misc/stm32f4xx_syscfg.h +1 -3
@@ -38,9 +38,7 @@#define SYSCFG_CMPCR 0x20#define TYPE_STM32F4XX_SYSCFG "stm32f4xx-syscfg" -typedef struct STM32F4xxSyscfgState STM32F4xxSyscfgState ; -DECLARE_INSTANCE_CHECKER (STM32F4xxSyscfgState,STM32F4XX_SYSCFG , - TYPE_STM32F4XX_SYSCFG) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F4xxSyscfgState, STM32F4XX_SYSCFG)#define SYSCFG_NUM_EXTICR 4
include/hw/misc/tz-mpc.h +1 -3
@@ -35,9 +35,7 @@#include "qom/object.h" #define TYPE_TZ_MPC "tz-mpc" -typedef struct TZMPC TZMPC ; -DECLARE_INSTANCE_CHECKER (TZMPC ,TZ_MPC , - TYPE_TZ_MPC) +OBJECT_DECLARE_SIMPLE_TYPE(TZMPC, TZ_MPC)#define TZ_NUM_PORTS 16
include/hw/misc/tz-msc.h +1 -3
@@ -55,9 +55,7 @@#include "qom/object.h" #define TYPE_TZ_MSC "tz-msc" -typedef struct TZMSC TZMSC ; -DECLARE_INSTANCE_CHECKER (TZMSC ,TZ_MSC , - TYPE_TZ_MSC) +OBJECT_DECLARE_SIMPLE_TYPE(TZMSC, TZ_MSC)struct TZMSC {/*< private >*/
include/hw/misc/tz-ppc.h +1 -3
@@ -69,9 +69,7 @@#include "qom/object.h" #define TYPE_TZ_PPC "tz-ppc" -typedef struct TZPPC TZPPC ; -DECLARE_INSTANCE_CHECKER (TZPPC ,TZ_PPC , - TYPE_TZ_PPC) +OBJECT_DECLARE_SIMPLE_TYPE(TZPPC, TZ_PPC)#define TZ_NUM_PORTS 16
include/hw/misc/unimp.h +1 -3
@@ -15,9 +15,7 @@#define TYPE_UNIMPLEMENTED_DEVICE "unimplemented-device" -typedef struct UnimplementedDeviceState UnimplementedDeviceState ; -DECLARE_INSTANCE_CHECKER (UnimplementedDeviceState,UNIMPLEMENTED_DEVICE , - TYPE_UNIMPLEMENTED_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(UnimplementedDeviceState, UNIMPLEMENTED_DEVICE)struct UnimplementedDeviceState {SysBusDevice parent_obj;
include/hw/misc/zynq-xadc.h +1 -3
@@ -24,9 +24,7 @@#define ZYNQ_XADC_FIFO_DEPTH 15#define TYPE_ZYNQ_XADC "xlnx,zynq-xadc" -typedef struct ZynqXADCState ZynqXADCState ; -DECLARE_INSTANCE_CHECKER (ZynqXADCState,ZYNQ_XADC , - TYPE_ZYNQ_XADC) +OBJECT_DECLARE_SIMPLE_TYPE(ZynqXADCState, ZYNQ_XADC)struct ZynqXADCState {/*< private >*/
include/hw/net/allwinner-sun8i-emac.h +1 -3
@@ -30,9 +30,7 @@*/ #define TYPE_AW_SUN8I_EMAC "allwinner-sun8i-emac" -typedef struct AwSun8iEmacState AwSun8iEmacState ; -DECLARE_INSTANCE_CHECKER (AwSun8iEmacState,AW_SUN8I_EMAC , -TYPE_AW_SUN8I_EMAC ) +OBJECT_DECLARE_SIMPLE_TYPE (AwSun8iEmacState,AW_SUN8I_EMAC )/** @} */
include/hw/net/allwinner_emac.h +1 -3
@@ -31,9 +31,7 @@#include "qom/object.h" #define TYPE_AW_EMAC "allwinner-emac" -typedef struct AwEmacState AwEmacState ; -DECLARE_INSTANCE_CHECKER (AwEmacState,AW_EMAC , -TYPE_AW_EMAC ) +OBJECT_DECLARE_SIMPLE_TYPE (AwEmacState,AW_EMAC )/* * Allwinner EMAC register list
include/hw/net/cadence_gem.h +1 -3
@@ -27,9 +27,7 @@#include "qom/object.h" #define TYPE_CADENCE_GEM "cadence_gem" -typedef struct CadenceGEMState CadenceGEMState ; -DECLARE_INSTANCE_CHECKER (CadenceGEMState,CADENCE_GEM , - TYPE_CADENCE_GEM) +OBJECT_DECLARE_SIMPLE_TYPE(CadenceGEMState, CADENCE_GEM)#include "net/net.h" #include "hw/sysbus.h"
include/hw/net/ftgmac100.h +2 -6
@@ -12,9 +12,7 @@#include "qom/object.h" #define TYPE_FTGMAC100 "ftgmac100" -typedef struct FTGMAC100State FTGMAC100State ; -DECLARE_INSTANCE_CHECKER (FTGMAC100State,FTGMAC100 , - TYPE_FTGMAC100) +OBJECT_DECLARE_SIMPLE_TYPE(FTGMAC100State, FTGMAC100)#include "hw/sysbus.h" #include "net/net.h"
@@ -70,9 +68,7 @@ struct FTGMAC100State { };#define TYPE_ASPEED_MII "aspeed-mmi" -typedef struct AspeedMiiState AspeedMiiState ; -DECLARE_INSTANCE_CHECKER (AspeedMiiState,ASPEED_MII , -TYPE_ASPEED_MII ) +OBJECT_DECLARE_SIMPLE_TYPE (AspeedMiiState,ASPEED_MII )/* * AST2600 MII controller
include/hw/net/imx_fec.h +1 -3
@@ -26,9 +26,7 @@#include "qom/object.h" #define TYPE_IMX_FEC "imx.fec" -typedef struct IMXFECState IMXFECState ; -DECLARE_INSTANCE_CHECKER (IMXFECState,IMX_FEC , - TYPE_IMX_FEC) +OBJECT_DECLARE_SIMPLE_TYPE(IMXFECState, IMX_FEC)#define TYPE_IMX_ENET "imx.enet"
include/hw/net/msf2-emac.h +1 -3
@@ -29,9 +29,7 @@#include "qom/object.h" #define TYPE_MSS_EMAC "msf2-emac" -typedef struct MSF2EmacState MSF2EmacState ; -DECLARE_INSTANCE_CHECKER (MSF2EmacState,MSS_EMAC , - TYPE_MSS_EMAC) +OBJECT_DECLARE_SIMPLE_TYPE(MSF2EmacState, MSS_EMAC)#define R_MAX (0x1a0 / 4)#define PHY_MAX_REGS 32
include/hw/nubus/mac-nubus-bridge.h +1 -3
@@ -13,9 +13,7 @@#include "qom/object.h" #define TYPE_MAC_NUBUS_BRIDGE "mac-nubus-bridge" -typedef struct MacNubusState MacNubusState ; -DECLARE_INSTANCE_CHECKER (MacNubusState,MAC_NUBUS_BRIDGE , - TYPE_MAC_NUBUS_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(MacNubusState, MAC_NUBUS_BRIDGE)struct MacNubusState {SysBusDevice sysbus_dev;
include/hw/nubus/nubus.h +2 -6
@@ -23,14 +23,10 @@#define NUBUS_LAST_SLOT 0xF#define TYPE_NUBUS_DEVICE "nubus-device" -typedef struct NubusDevice NubusDevice ; -DECLARE_INSTANCE_CHECKER (NubusDevice,NUBUS_DEVICE , - TYPE_NUBUS_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(NubusDevice, NUBUS_DEVICE)#define TYPE_NUBUS_BUS "nubus-bus" -typedef struct NubusBus NubusBus ; -DECLARE_INSTANCE_CHECKER (NubusBus,NUBUS_BUS , - TYPE_NUBUS_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(NubusBus, NUBUS_BUS)#define TYPE_NUBUS_BRIDGE "nubus-bridge"
include/hw/nvram/fw_cfg.h +3 -6
@@ -12,12 +12,9 @@#define TYPE_FW_CFG_MEM "fw_cfg_mem"#define TYPE_FW_CFG_DATA_GENERATOR_INTERFACE "fw_cfg-data-generator" -DECLARE_INSTANCE_CHECKER (FWCfgState,FW_CFG , - TYPE_FW_CFG) -DECLARE_INSTANCE_CHECKER (FWCfgIoState,FW_CFG_IO , - TYPE_FW_CFG_IO) -DECLARE_INSTANCE_CHECKER (FWCfgMemState,FW_CFG_MEM , - TYPE_FW_CFG_MEM) +OBJECT_DECLARE_SIMPLE_TYPE(FWCfgState, FW_CFG) +OBJECT_DECLARE_SIMPLE_TYPE(FWCfgIoState, FW_CFG_IO) +OBJECT_DECLARE_SIMPLE_TYPE(FWCfgMemState, FW_CFG_MEM)typedef struct FWCfgDataGeneratorClass FWCfgDataGeneratorClass ; DECLARE_CLASS_CHECKERS(FWCfgDataGeneratorClass, FW_CFG_DATA_GENERATOR,
include/hw/nvram/nrf51_nvm.h +1 -3
@@ -25,9 +25,7 @@#include "hw/sysbus.h" #include "qom/object.h" #define TYPE_NRF51_NVM "nrf51_soc.nvm" -typedef struct NRF51NVMState NRF51NVMState ; -DECLARE_INSTANCE_CHECKER (NRF51NVMState,NRF51_NVM , - TYPE_NRF51_NVM) +OBJECT_DECLARE_SIMPLE_TYPE(NRF51NVMState, NRF51_NVM)#define NRF51_UICR_FIXTURE_SIZE 64
include/hw/pci-bridge/simba.h +1 -3
@@ -35,10 +35,8 @@ struct SimbaPCIBridge {/*< private >*/ PCIBridge parent_obj; }; -typedef struct SimbaPCIBridge SimbaPCIBridge ;#define TYPE_SIMBA_PCI_BRIDGE "pbm-bridge" -DECLARE_INSTANCE_CHECKER (SimbaPCIBridge,SIMBA_PCI_BRIDGE , - TYPE_SIMBA_PCI_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(SimbaPCIBridge, SIMBA_PCI_BRIDGE)#endif
include/hw/pci-host/designware.h +2 -6
@@ -29,14 +29,10 @@#include "qom/object.h" #define TYPE_DESIGNWARE_PCIE_HOST "designware-pcie-host" -typedef struct DesignwarePCIEHost DesignwarePCIEHost ; -DECLARE_INSTANCE_CHECKER (DesignwarePCIEHost,DESIGNWARE_PCIE_HOST , - TYPE_DESIGNWARE_PCIE_HOST) +OBJECT_DECLARE_SIMPLE_TYPE(DesignwarePCIEHost, DESIGNWARE_PCIE_HOST)#define TYPE_DESIGNWARE_PCIE_ROOT "designware-pcie-root" -typedef struct DesignwarePCIERoot DesignwarePCIERoot ; -DECLARE_INSTANCE_CHECKER (DesignwarePCIERoot,DESIGNWARE_PCIE_ROOT , - TYPE_DESIGNWARE_PCIE_ROOT) +OBJECT_DECLARE_SIMPLE_TYPE(DesignwarePCIERoot, DESIGNWARE_PCIE_ROOT)struct DesignwarePCIERoot ;
include/hw/pci-host/gpex.h +2 -6
@@ -26,14 +26,10 @@#include "qom/object.h" #define TYPE_GPEX_HOST "gpex-pcihost" -typedef struct GPEXHost GPEXHost ; -DECLARE_INSTANCE_CHECKER (GPEXHost,GPEX_HOST , - TYPE_GPEX_HOST) +OBJECT_DECLARE_SIMPLE_TYPE(GPEXHost, GPEX_HOST)#define TYPE_GPEX_ROOT_DEVICE "gpex-root" -typedef struct GPEXRootState GPEXRootState ; -DECLARE_INSTANCE_CHECKER (GPEXRootState,GPEX_ROOT_DEVICE , - TYPE_GPEX_ROOT_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(GPEXRootState, GPEX_ROOT_DEVICE)#define GPEX_NUM_IRQS 4
include/hw/pci-host/i440fx.h +1 -3
@@ -19,9 +19,7 @@#define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost"#define TYPE_I440FX_PCI_DEVICE "i440FX" -typedef struct PCII440FXState PCII440FXState ; -DECLARE_INSTANCE_CHECKER (PCII440FXState,I440FX_PCI_DEVICE , - TYPE_I440FX_PCI_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(PCII440FXState, I440FX_PCI_DEVICE)struct PCII440FXState {/*< private >*/
include/hw/pci-host/pnv_phb3.h +2 -5
@@ -72,9 +72,7 @@ typedef struct PnvPhb3DMASpace {* PHB3 Power Bus Common Queue */ #define TYPE_PNV_PBCQ "pnv-pbcq" -typedef struct PnvPBCQState PnvPBCQState ; -DECLARE_INSTANCE_CHECKER (PnvPBCQState,PNV_PBCQ , - TYPE_PNV_PBCQ) +OBJECT_DECLARE_SIMPLE_TYPE(PnvPBCQState, PNV_PBCQ)struct PnvPBCQState {DeviceState parent;
@@ -118,8 +116,7 @@ typedef struct PnvPHB3RootPort {* PHB3 PCIe Host Bridge for PowerNV machines (POWER8) */ #define TYPE_PNV_PHB3 "pnv-phb3" -DECLARE_INSTANCE_CHECKER (PnvPHB3,PNV_PHB3 , - TYPE_PNV_PHB3) +OBJECT_DECLARE_SIMPLE_TYPE(PnvPHB3, PNV_PHB3)#define PNV_PHB3_NUM_M64 16#define PNV_PHB3_NUM_REGS (0x1000 >> 3)
include/hw/pci-host/pnv_phb4.h +2 -4
@@ -57,8 +57,7 @@ typedef struct PnvPHB4RootPort {* PHB4 PCIe Host Bridge for PowerNV machines (POWER9) */ #define TYPE_PNV_PHB4 "pnv-phb4" -DECLARE_INSTANCE_CHECKER (PnvPHB4,PNV_PHB4 , - TYPE_PNV_PHB4) +OBJECT_DECLARE_SIMPLE_TYPE(PnvPHB4, PNV_PHB4)#define PNV_PHB4_MAX_LSIs 8#define PNV_PHB4_MAX_INTs 4096
@@ -144,8 +143,7 @@ extern const MemoryRegionOps pnv_phb4_xscom_ops; OBJECT_DECLARE_TYPE(PnvPhb4PecState, PnvPhb4PecClass, PNV_PHB4_PEC)#define TYPE_PNV_PHB4_PEC_STACK "pnv-phb4-pec-stack" -DECLARE_INSTANCE_CHECKER (PnvPhb4PecStack,PNV_PHB4_PEC_STACK , -TYPE_PNV_PHB4_PEC_STACK ) +OBJECT_DECLARE_SIMPLE_TYPE (PnvPhb4PecStack,PNV_PHB4_PEC_STACK ) /* Per-stack data */struct PnvPhb4PecStack {
include/hw/pci-host/q35.h +2 -6
@@ -30,14 +30,10 @@#include "qom/object.h" #define TYPE_Q35_HOST_DEVICE "q35-pcihost" -typedef struct Q35PCIHost Q35PCIHost ; -DECLARE_INSTANCE_CHECKER (Q35PCIHost,Q35_HOST_DEVICE , - TYPE_Q35_HOST_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(Q35PCIHost, Q35_HOST_DEVICE)#define TYPE_MCH_PCI_DEVICE "mch" -typedef struct MCHPCIState MCHPCIState ; -DECLARE_INSTANCE_CHECKER (MCHPCIState,MCH_PCI_DEVICE , - TYPE_MCH_PCI_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(MCHPCIState, MCH_PCI_DEVICE)struct MCHPCIState {/*< private >*/
include/hw/pci-host/sabre.h +2 -6
@@ -20,11 +20,9 @@struct SabrePCIState {PCIDevice parent_obj; }; -typedef struct SabrePCIState SabrePCIState ;#define TYPE_SABRE_PCI_DEVICE "sabre-pci" -DECLARE_INSTANCE_CHECKER (SabrePCIState,SABRE_PCI_DEVICE , - TYPE_SABRE_PCI_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(SabrePCIState, SABRE_PCI_DEVICE)struct SabreState {PCIHostState parent_obj;
@@ -48,10 +46,8 @@ struct SabreState {uint32_t reset_control;unsigned int nr_resets; }; -typedef struct SabreState SabreState ;#define TYPE_SABRE "sabre" -DECLARE_INSTANCE_CHECKER (SabreState,SABRE , - TYPE_SABRE) +OBJECT_DECLARE_SIMPLE_TYPE(SabreState, SABRE)#endif
include/hw/pci-host/spapr.h +1 -3
@@ -28,9 +28,7 @@#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge" -typedef struct SpaprPhbState SpaprPhbState ; -DECLARE_INSTANCE_CHECKER (SpaprPhbState,SPAPR_PCI_HOST_BRIDGE , - TYPE_SPAPR_PCI_HOST_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(SpaprPhbState, SPAPR_PCI_HOST_BRIDGE)#define SPAPR_PCI_DMA_MAX_WINDOWS 2
include/hw/pci-host/uninorth.h +1 -3
@@ -63,10 +63,8 @@ struct UNINState {MemoryRegion mem; }; -typedef struct UNINState UNINState ;#define TYPE_UNI_NORTH "uni-north" -DECLARE_INSTANCE_CHECKER (UNINState,UNI_NORTH , - TYPE_UNI_NORTH) +OBJECT_DECLARE_SIMPLE_TYPE(UNINState, UNI_NORTH)#endif /* UNINORTH_H */
include/hw/pci-host/xilinx-pcie.h +2 -6
@@ -27,14 +27,10 @@#include "qom/object.h" #define TYPE_XILINX_PCIE_HOST "xilinx-pcie-host" -typedef struct XilinxPCIEHost XilinxPCIEHost ; -DECLARE_INSTANCE_CHECKER (XilinxPCIEHost,XILINX_PCIE_HOST , - TYPE_XILINX_PCIE_HOST) +OBJECT_DECLARE_SIMPLE_TYPE(XilinxPCIEHost, XILINX_PCIE_HOST)#define TYPE_XILINX_PCIE_ROOT "xilinx-pcie-root" -typedef struct XilinxPCIERoot XilinxPCIERoot ; -DECLARE_INSTANCE_CHECKER (XilinxPCIERoot,XILINX_PCIE_ROOT , - TYPE_XILINX_PCIE_ROOT) +OBJECT_DECLARE_SIMPLE_TYPE(XilinxPCIERoot, XILINX_PCIE_ROOT)struct XilinxPCIERoot {PCIBridge parent_obj;
include/hw/pci/pci_bridge.h +1 -2
@@ -51,8 +51,7 @@ struct PCIBridgeWindows { };#define TYPE_PCI_BRIDGE "base-pci-bridge" -DECLARE_INSTANCE_CHECKER (PCIBridge,PCI_BRIDGE , - TYPE_PCI_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(PCIBridge, PCI_BRIDGE)struct PCIBridge {/*< private >*/
include/hw/pci/pcie_host.h +1 -2
@@ -26,8 +26,7 @@#include "qom/object.h" #define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge" -DECLARE_INSTANCE_CHECKER (PCIExpressHost,PCIE_HOST_BRIDGE , - TYPE_PCIE_HOST_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(PCIExpressHost, PCIE_HOST_BRIDGE)#define PCIE_HOST_MCFG_BASE "MCFG"#define PCIE_HOST_MCFG_SIZE "mcfg_size"
include/hw/pci/pcie_port.h +2 -4
@@ -26,8 +26,7 @@#include "qom/object.h" #define TYPE_PCIE_PORT "pcie-port" -DECLARE_INSTANCE_CHECKER (PCIEPort,PCIE_PORT , - TYPE_PCIE_PORT) +OBJECT_DECLARE_SIMPLE_TYPE(PCIEPort, PCIE_PORT)struct PCIEPort {/*< private >*/
@@ -41,8 +40,7 @@ struct PCIEPort {void pcie_port_init_reg (PCIDevice *d);#define TYPE_PCIE_SLOT "pcie-slot" -DECLARE_INSTANCE_CHECKER (PCIESlot,PCIE_SLOT , - TYPE_PCIE_SLOT) +OBJECT_DECLARE_SIMPLE_TYPE(PCIESlot, PCIE_SLOT)struct PCIESlot {/*< private >*/
include/hw/platform-bus.h +1 -3
@@ -25,11 +25,9 @@#include "hw/sysbus.h" #include "qom/object.h" -typedef struct PlatformBusDevice PlatformBusDevice ;#define TYPE_PLATFORM_BUS_DEVICE "platform-bus-device" -DECLARE_INSTANCE_CHECKER (PlatformBusDevice,PLATFORM_BUS_DEVICE , - TYPE_PLATFORM_BUS_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(PlatformBusDevice, PLATFORM_BUS_DEVICE)struct PlatformBusDevice {/*< private >*/
include/hw/ppc/mac_dbdma.h +1 -2
@@ -178,7 +178,6 @@ void DBDMA_register_channel(void *dbdma, int nchan, qemu_irq irq,void DBDMA_kick (DBDMAState *dbdma);#define TYPE_MAC_DBDMA "mac-dbdma" -DECLARE_INSTANCE_CHECKER (DBDMAState,MAC_DBDMA , - TYPE_MAC_DBDMA) +OBJECT_DECLARE_SIMPLE_TYPE(DBDMAState, MAC_DBDMA)#endif
include/hw/ppc/openpic.h +1 -3
@@ -137,9 +137,7 @@ typedef struct IRQDest { } IRQDest;#define TYPE_OPENPIC "openpic" -typedef struct OpenPICState OpenPICState ; -DECLARE_INSTANCE_CHECKER (OpenPICState,OPENPIC , - TYPE_OPENPIC) +OBJECT_DECLARE_SIMPLE_TYPE(OpenPICState, OPENPIC)struct OpenPICState {/*< private >*/
include/hw/ppc/pnv_core.h +1 -3
@@ -62,9 +62,7 @@ static inline PnvCPUState *pnv_cpu_state(PowerPCCPU *cpu) }#define TYPE_PNV_QUAD "powernv-cpu-quad" -typedef struct PnvQuad PnvQuad ; -DECLARE_INSTANCE_CHECKER (PnvQuad,PNV_QUAD , - TYPE_PNV_QUAD) +OBJECT_DECLARE_SIMPLE_TYPE(PnvQuad, PNV_QUAD)struct PnvQuad {DeviceState parent_obj;
include/hw/ppc/pnv_pnor.h +1 -3
@@ -16,9 +16,7 @@#define PNOR_SPI_OFFSET 0x0c000000UL#define TYPE_PNV_PNOR "pnv-pnor" -typedef struct PnvPnor PnvPnor ; -DECLARE_INSTANCE_CHECKER (PnvPnor,PNV_PNOR , - TYPE_PNV_PNOR) +OBJECT_DECLARE_SIMPLE_TYPE(PnvPnor, PNV_PNOR)struct PnvPnor {SysBusDevice parent_obj;
include/hw/ppc/pnv_psi.h +2 -6
@@ -51,9 +51,7 @@ struct PnvPsi { };#define TYPE_PNV8_PSI TYPE_PNV_PSI "-POWER8" -typedef struct Pnv8Psi Pnv8Psi ; -DECLARE_INSTANCE_CHECKER (Pnv8Psi,PNV8_PSI , - TYPE_PNV8_PSI) +OBJECT_DECLARE_SIMPLE_TYPE(Pnv8Psi, PNV8_PSI)struct Pnv8Psi {PnvPsi parent;
@@ -62,9 +60,7 @@ struct Pnv8Psi { };#define TYPE_PNV9_PSI TYPE_PNV_PSI "-POWER9" -typedef struct Pnv9Psi Pnv9Psi ; -DECLARE_INSTANCE_CHECKER (Pnv9Psi,PNV9_PSI , - TYPE_PNV9_PSI) +OBJECT_DECLARE_SIMPLE_TYPE(Pnv9Psi, PNV9_PSI)struct Pnv9Psi {PnvPsi parent;
include/hw/ppc/spapr.h +2 -6
@@ -28,9 +28,7 @@ typedef struct SpaprPendingHpt SpaprPendingHpt;#define TYPE_SPAPR_RTC "spapr-rtc" -typedef struct SpaprRtcState SpaprRtcState ; -DECLARE_INSTANCE_CHECKER (SpaprRtcState,SPAPR_RTC , - TYPE_SPAPR_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(SpaprRtcState, SPAPR_RTC)struct SpaprRtcState {/*< private >*/
@@ -781,11 +779,9 @@ static inline void spapr_dt_irq(uint32_t *intspec, int irq, bool is_lsi) intspec[1 ] = is_lsi ?cpu_to_be32 (1 ) :0 ; } -typedef struct SpaprTceTable SpaprTceTable ;#define TYPE_SPAPR_TCE_TABLE "spapr-tce-table" -DECLARE_INSTANCE_CHECKER (SpaprTceTable,SPAPR_TCE_TABLE , - TYPE_SPAPR_TCE_TABLE) +OBJECT_DECLARE_SIMPLE_TYPE(SpaprTceTable, SPAPR_TCE_TABLE)#define TYPE_SPAPR_IOMMU_MEMORY_REGION "spapr-iommu-memory-region" DECLARE_INSTANCE_CHECKER(IOMMUMemoryRegion, SPAPR_IOMMU_MEMORY_REGION,
include/hw/ppc/spapr_tpm_proxy.h +1 -3
@@ -17,9 +17,7 @@#include "hw/qdev-core.h" #define TYPE_SPAPR_TPM_PROXY "spapr-tpm-proxy" -typedef struct SpaprTpmProxy SpaprTpmProxy ; -DECLARE_INSTANCE_CHECKER (SpaprTpmProxy,SPAPR_TPM_PROXY , - TYPE_SPAPR_TPM_PROXY) +OBJECT_DECLARE_SIMPLE_TYPE(SpaprTpmProxy, SPAPR_TPM_PROXY)struct SpaprTpmProxy {/*< private >*/
include/hw/ppc/spapr_vio.h +1 -3
@@ -32,9 +32,7 @@ OBJECT_DECLARE_TYPE(SpaprVioDevice, SpaprVioDeviceClass, VIO_SPAPR_DEVICE)#define TYPE_SPAPR_VIO_BUS "spapr-vio-bus" -typedef struct SpaprVioBus SpaprVioBus ; -DECLARE_INSTANCE_CHECKER (SpaprVioBus,SPAPR_VIO_BUS , - TYPE_SPAPR_VIO_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(SpaprVioBus, SPAPR_VIO_BUS)#define TYPE_SPAPR_VIO_BRIDGE "spapr-vio-bridge"
include/hw/ppc/xive.h +3 -9
@@ -168,9 +168,7 @@ struct XiveNotifierClass {*/ #define TYPE_XIVE_SOURCE "xive-source" -typedef struct XiveSource XiveSource ; -DECLARE_INSTANCE_CHECKER (XiveSource,XIVE_SOURCE , -TYPE_XIVE_SOURCE ) +OBJECT_DECLARE_SIMPLE_TYPE (XiveSource,XIVE_SOURCE )/* * XIVE Interrupt Source characteristics, which define how the ESB are
@@ -306,9 +304,7 @@ void xive_source_set_irq(void *opaque, int srcno, int val);*/ #define TYPE_XIVE_TCTX "xive-tctx" -typedef struct XiveTCTX XiveTCTX ; -DECLARE_INSTANCE_CHECKER (XiveTCTX,XIVE_TCTX , -TYPE_XIVE_TCTX ) +OBJECT_DECLARE_SIMPLE_TYPE (XiveTCTX,XIVE_TCTX )/* * XIVE Thread interrupt Management register rings :
@@ -433,9 +429,7 @@ struct XiveFabricClass {*/ #define TYPE_XIVE_END_SOURCE "xive-end-source" -typedef struct XiveENDSource XiveENDSource ; -DECLARE_INSTANCE_CHECKER (XiveENDSource,XIVE_END_SOURCE , - TYPE_XIVE_END_SOURCE) +OBJECT_DECLARE_SIMPLE_TYPE(XiveENDSource, XIVE_END_SOURCE)struct XiveENDSource {DeviceState parent;
include/hw/riscv/opentitan.h +1 -3
@@ -25,9 +25,7 @@#include "qom/object.h" #define TYPE_RISCV_IBEX_SOC "riscv.lowrisc.ibex.soc" -typedef struct LowRISCIbexSoCState LowRISCIbexSoCState ; -DECLARE_INSTANCE_CHECKER (LowRISCIbexSoCState,RISCV_IBEX_SOC , - TYPE_RISCV_IBEX_SOC) +OBJECT_DECLARE_SIMPLE_TYPE(LowRISCIbexSoCState, RISCV_IBEX_SOC)struct LowRISCIbexSoCState {/*< private >*/
include/hw/riscv/riscv_hart.h +1 -3
@@ -27,9 +27,7 @@#define TYPE_RISCV_HART_ARRAY "riscv.hart_array" -typedef struct RISCVHartArrayState RISCVHartArrayState ; -DECLARE_INSTANCE_CHECKER (RISCVHartArrayState,RISCV_HART_ARRAY , - TYPE_RISCV_HART_ARRAY) +OBJECT_DECLARE_SIMPLE_TYPE(RISCVHartArrayState, RISCV_HART_ARRAY)struct RISCVHartArrayState {/*< private >*/
include/hw/rtc/aspeed_rtc.h +1 -3
@@ -21,10 +21,8 @@ struct AspeedRtcState {int offset; }; -typedef struct AspeedRtcState AspeedRtcState ;#define TYPE_ASPEED_RTC "aspeed.rtc" -DECLARE_INSTANCE_CHECKER (AspeedRtcState,ASPEED_RTC , - TYPE_ASPEED_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(AspeedRtcState, ASPEED_RTC)#endif /* HW_RTC_ASPEED_RTC_H */
include/hw/rtc/goldfish_rtc.h +1 -3
@@ -26,9 +26,7 @@#include "qom/object.h" #define TYPE_GOLDFISH_RTC "goldfish_rtc" -typedef struct GoldfishRTCState GoldfishRTCState ; -DECLARE_INSTANCE_CHECKER (GoldfishRTCState,GOLDFISH_RTC , - TYPE_GOLDFISH_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(GoldfishRTCState, GOLDFISH_RTC)struct GoldfishRTCState {SysBusDevice parent_obj;
include/hw/rtc/mc146818rtc.h +1 -3
@@ -16,9 +16,7 @@#include "qom/object.h" #define TYPE_MC146818_RTC "mc146818rtc" -typedef struct RTCState RTCState ; -DECLARE_INSTANCE_CHECKER (RTCState,MC146818_RTC , - TYPE_MC146818_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(RTCState, MC146818_RTC)struct RTCState {ISADevice parent_obj;
include/hw/rtc/pl031.h +1 -3
@@ -19,9 +19,7 @@#include "qom/object.h" #define TYPE_PL031 "pl031" -typedef struct PL031State PL031State ; -DECLARE_INSTANCE_CHECKER (PL031State,PL031 , - TYPE_PL031) +OBJECT_DECLARE_SIMPLE_TYPE(PL031State, PL031)struct PL031State {SysBusDevice parent_obj;
include/hw/rtc/xlnx-zynqmp-rtc.h +1 -3
@@ -33,9 +33,7 @@#define TYPE_XLNX_ZYNQMP_RTC "xlnx-zynmp.rtc" -typedef struct XlnxZynqMPRTC XlnxZynqMPRTC ; -DECLARE_INSTANCE_CHECKER (XlnxZynqMPRTC,XLNX_ZYNQMP_RTC , - TYPE_XLNX_ZYNQMP_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqMPRTC, XLNX_ZYNQMP_RTC) REG32(SET_TIME_WRITE, 0x0)REG32 (SET_TIME_READ ,0x4 )
include/hw/s390x/css-bridge.h +2 -6
@@ -21,21 +21,17 @@ struct VirtualCssBridge {SysBusDevice sysbus_dev;bool css_dev_path; }; -typedef struct VirtualCssBridge VirtualCssBridge ;#define TYPE_VIRTUAL_CSS_BRIDGE "virtual-css-bridge" -DECLARE_INSTANCE_CHECKER (VirtualCssBridge,VIRTUAL_CSS_BRIDGE , -TYPE_VIRTUAL_CSS_BRIDGE ) +OBJECT_DECLARE_SIMPLE_TYPE (VirtualCssBridge,VIRTUAL_CSS_BRIDGE ) /* virtual css bus type */struct VirtualCssBus {BusState parent_obj; }; -typedef struct VirtualCssBus VirtualCssBus ;#define TYPE_VIRTUAL_CSS_BUS "virtual-css-bus" -DECLARE_INSTANCE_CHECKER (VirtualCssBus,VIRTUAL_CSS_BUS , - TYPE_VIRTUAL_CSS_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(VirtualCssBus, VIRTUAL_CSS_BUS)VirtualCssBus *virtual_css_bus_init (void );#endif
include/hw/s390x/s390_flic.h +1 -3
@@ -77,9 +77,7 @@ DECLARE_INSTANCE_CHECKER(KVMS390FLICState, KVM_S390_FLIC, TYPE_KVM_S390_FLIC)#define TYPE_QEMU_S390_FLIC "s390-flic-qemu" -typedef struct QEMUS390FLICState QEMUS390FLICState ; -DECLARE_INSTANCE_CHECKER (QEMUS390FLICState,QEMU_S390_FLIC , - TYPE_QEMU_S390_FLIC) +OBJECT_DECLARE_SIMPLE_TYPE(QEMUS390FLICState, QEMU_S390_FLIC)#define SIC_IRQ_MODE_ALL 0#define SIC_IRQ_MODE_SINGLE 1
include/hw/s390x/vfio-ccw.h +1 -3
@@ -20,9 +20,7 @@#include "qom/object.h" #define TYPE_VFIO_CCW "vfio-ccw" -typedef struct VFIOCCWDevice VFIOCCWDevice ; -DECLARE_INSTANCE_CHECKER (VFIOCCWDevice,VFIO_CCW , - TYPE_VFIO_CCW) +OBJECT_DECLARE_SIMPLE_TYPE(VFIOCCWDevice, VFIO_CCW)#define TYPE_VFIO_CCW "vfio-ccw"
include/hw/scsi/esp.h +1 -3
@@ -66,9 +66,7 @@ struct ESPState { };#define TYPE_ESP "esp" -typedef struct SysBusESPState SysBusESPState ; -DECLARE_INSTANCE_CHECKER (SysBusESPState,ESP , - TYPE_ESP) +OBJECT_DECLARE_SIMPLE_TYPE(SysBusESPState, ESP)struct SysBusESPState {/*< private >*/
include/hw/scsi/scsi.h +1 -2
@@ -132,8 +132,7 @@ struct SCSIBusInfo { };#define TYPE_SCSI_BUS "SCSI" -DECLARE_INSTANCE_CHECKER (SCSIBus,SCSI_BUS , - TYPE_SCSI_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(SCSIBus, SCSI_BUS)struct SCSIBus {BusState qbus;
include/hw/sd/aspeed_sdhci.h +1 -3
@@ -13,9 +13,7 @@#include "qom/object.h" #define TYPE_ASPEED_SDHCI "aspeed.sdhci" -typedef struct AspeedSDHCIState AspeedSDHCIState ; -DECLARE_INSTANCE_CHECKER (AspeedSDHCIState,ASPEED_SDHCI , - TYPE_ASPEED_SDHCI) +OBJECT_DECLARE_SIMPLE_TYPE(AspeedSDHCIState, ASPEED_SDHCI)#define ASPEED_SDHCI_CAPABILITIES 0x01E80080#define ASPEED_SDHCI_NUM_SLOTS 2
include/hw/sd/bcm2835_sdhost.h +1 -3
@@ -19,9 +19,7 @@#include "qom/object.h" #define TYPE_BCM2835_SDHOST "bcm2835-sdhost" -typedef struct BCM2835SDHostState BCM2835SDHostState ; -DECLARE_INSTANCE_CHECKER (BCM2835SDHostState,BCM2835_SDHOST , - TYPE_BCM2835_SDHOST) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835SDHostState, BCM2835_SDHOST)#define BCM2835_SDHOST_FIFO_LEN 16
include/hw/sparc/sparc32_dma.h +4 -12
@@ -9,9 +9,7 @@#define DMA_REGS 4#define TYPE_SPARC32_DMA_DEVICE "sparc32-dma-device" -typedef struct DMADeviceState DMADeviceState ; -DECLARE_INSTANCE_CHECKER (DMADeviceState,SPARC32_DMA_DEVICE , - TYPE_SPARC32_DMA_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(DMADeviceState, SPARC32_DMA_DEVICE)struct DMADeviceState {
@@ -25,9 +23,7 @@ struct DMADeviceState { };#define TYPE_SPARC32_ESPDMA_DEVICE "sparc32-espdma" -typedef struct ESPDMADeviceState ESPDMADeviceState ; -DECLARE_INSTANCE_CHECKER (ESPDMADeviceState,SPARC32_ESPDMA_DEVICE , - TYPE_SPARC32_ESPDMA_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(ESPDMADeviceState, SPARC32_ESPDMA_DEVICE)struct ESPDMADeviceState {DMADeviceState parent_obj;
@@ -36,9 +32,7 @@ struct ESPDMADeviceState { };#define TYPE_SPARC32_LEDMA_DEVICE "sparc32-ledma" -typedef struct LEDMADeviceState LEDMADeviceState ; -DECLARE_INSTANCE_CHECKER (LEDMADeviceState,SPARC32_LEDMA_DEVICE , - TYPE_SPARC32_LEDMA_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(LEDMADeviceState, SPARC32_LEDMA_DEVICE)struct LEDMADeviceState {DMADeviceState parent_obj;
@@ -47,9 +41,7 @@ struct LEDMADeviceState { };#define TYPE_SPARC32_DMA "sparc32-dma" -typedef struct SPARC32DMAState SPARC32DMAState ; -DECLARE_INSTANCE_CHECKER (SPARC32DMAState,SPARC32_DMA , - TYPE_SPARC32_DMA) +OBJECT_DECLARE_SIMPLE_TYPE(SPARC32DMAState, SPARC32_DMA)struct SPARC32DMAState {SysBusDevice parent_obj;
include/hw/ssi/imx_spi.h +1 -3
@@ -78,9 +78,7 @@#define EXTRACT (value, name) extract32(value, name##_SHIFT, name##_LENGTH)#define TYPE_IMX_SPI "imx.spi" -typedef struct IMXSPIState IMXSPIState ; -DECLARE_INSTANCE_CHECKER (IMXSPIState,IMX_SPI , - TYPE_IMX_SPI) +OBJECT_DECLARE_SIMPLE_TYPE(IMXSPIState, IMX_SPI)struct IMXSPIState {/* <private> */
include/hw/ssi/mss-spi.h +1 -3
@@ -31,9 +31,7 @@#include "qom/object.h" #define TYPE_MSS_SPI "mss-spi" -typedef struct MSSSpiState MSSSpiState ; -DECLARE_INSTANCE_CHECKER (MSSSpiState,MSS_SPI , - TYPE_MSS_SPI) +OBJECT_DECLARE_SIMPLE_TYPE(MSSSpiState, MSS_SPI)#define R_SPI_MAX 16
include/hw/ssi/pl022.h +1 -3
@@ -25,9 +25,7 @@#include "qom/object.h" #define TYPE_PL022 "pl022" -typedef struct PL022State PL022State ; -DECLARE_INSTANCE_CHECKER (PL022State,PL022 , - TYPE_PL022) +OBJECT_DECLARE_SIMPLE_TYPE(PL022State, PL022)struct PL022State {SysBusDevice parent_obj;
include/hw/ssi/stm32f2xx_spi.h +1 -3
@@ -45,9 +45,7 @@#define STM_SPI_SR_RXNE 1#define TYPE_STM32F2XX_SPI "stm32f2xx-spi" -typedef struct STM32F2XXSPIState STM32F2XXSPIState ; -DECLARE_INSTANCE_CHECKER (STM32F2XXSPIState,STM32F2XX_SPI , - TYPE_STM32F2XX_SPI) +OBJECT_DECLARE_SIMPLE_TYPE(STM32F2XXSPIState, STM32F2XX_SPI)struct STM32F2XXSPIState {/* <private> */
include/hw/ssi/xilinx_spips.h +2 -5
@@ -120,7 +120,6 @@ struct XlnxZynqMPQSPIPS {uint32_t dma_burst_size;uint8_t dma_buf[QSPI_DMA_MAX_BURST_SIZE ]; }; -typedef struct XlnxZynqMPQSPIPS XlnxZynqMPQSPIPS ;struct XilinxSPIPSClass {SysBusDeviceClass parent_class;
@@ -137,10 +136,8 @@ struct XilinxSPIPSClass { OBJECT_DECLARE_TYPE(XilinxSPIPS, XilinxSPIPSClass, XILINX_SPIPS) -DECLARE_INSTANCE_CHECKER (XilinxQSPIPS,XILINX_QSPIPS , - TYPE_XILINX_QSPIPS) +OBJECT_DECLARE_SIMPLE_TYPE(XilinxQSPIPS, XILINX_QSPIPS) -DECLARE_INSTANCE_CHECKER (XlnxZynqMPQSPIPS,XLNX_ZYNQMP_QSPIPS , - TYPE_XLNX_ZYNQMP_QSPIPS) +OBJECT_DECLARE_SIMPLE_TYPE(XlnxZynqMPQSPIPS, XLNX_ZYNQMP_QSPIPS)#endif /* XILINX_SPIPS_H */
include/hw/timer/a9gtimer.h +1 -3
@@ -29,9 +29,7 @@#define A9_GTIMER_MAX_CPUS 4#define TYPE_A9_GTIMER "arm.cortex-a9-global-timer" -typedef struct A9GTimerState A9GTimerState ; -DECLARE_INSTANCE_CHECKER (A9GTimerState,A9_GTIMER , - TYPE_A9_GTIMER) +OBJECT_DECLARE_SIMPLE_TYPE(A9GTimerState, A9_GTIMER)#define R_COUNTER_LO 0x00#define R_COUNTER_HI 0x04
include/hw/timer/allwinner-a10-pit.h +1 -3
@@ -6,9 +6,7 @@#include "qom/object.h" #define TYPE_AW_A10_PIT "allwinner-A10-timer" -typedef struct AwA10PITState AwA10PITState ; -DECLARE_INSTANCE_CHECKER (AwA10PITState,AW_A10_PIT , - TYPE_AW_A10_PIT) +OBJECT_DECLARE_SIMPLE_TYPE(AwA10PITState, AW_A10_PIT)#define AW_A10_PIT_TIMER_NR 6#define AW_A10_PIT_TIMER_IRQ 0x1
include/hw/timer/arm_mptimer.h +1 -3
@@ -36,9 +36,7 @@ typedef struct { } TimerBlock;#define TYPE_ARM_MPTIMER "arm_mptimer" -typedef struct ARMMPTimerState ARMMPTimerState ; -DECLARE_INSTANCE_CHECKER (ARMMPTimerState,ARM_MPTIMER , - TYPE_ARM_MPTIMER) +OBJECT_DECLARE_SIMPLE_TYPE(ARMMPTimerState, ARM_MPTIMER)struct ARMMPTimerState {/*< private >*/
include/hw/timer/armv7m_systick.h +1 -3
@@ -17,9 +17,7 @@#define TYPE_SYSTICK "armv7m_systick" -typedef struct SysTickState SysTickState ; -DECLARE_INSTANCE_CHECKER (SysTickState,SYSTICK , - TYPE_SYSTICK) +OBJECT_DECLARE_SIMPLE_TYPE(SysTickState, SYSTICK)struct SysTickState {/*< private >*/
include/hw/timer/avr_timer16.h +1 -3
@@ -42,9 +42,7 @@ enum NextInterrupt { };#define TYPE_AVR_TIMER16 "avr-timer16" -typedef struct AVRTimer16State AVRTimer16State ; -DECLARE_INSTANCE_CHECKER (AVRTimer16State,AVR_TIMER16 , - TYPE_AVR_TIMER16) +OBJECT_DECLARE_SIMPLE_TYPE(AVRTimer16State, AVR_TIMER16)struct AVRTimer16State {/* <private> */
include/hw/timer/bcm2835_systmr.h +1 -3
@@ -14,9 +14,7 @@#include "qom/object.h" #define TYPE_BCM2835_SYSTIMER "bcm2835-sys-timer" -typedef struct BCM2835SystemTimerState BCM2835SystemTimerState ; -DECLARE_INSTANCE_CHECKER (BCM2835SystemTimerState,BCM2835_SYSTIMER , - TYPE_BCM2835_SYSTIMER) +OBJECT_DECLARE_SIMPLE_TYPE(BCM2835SystemTimerState, BCM2835_SYSTIMER)struct BCM2835SystemTimerState {/*< private >*/
include/hw/timer/cmsdk-apb-dualtimer.h +1 -3
@@ -31,9 +31,7 @@#include "qom/object.h" #define TYPE_CMSDK_APB_DUALTIMER "cmsdk-apb-dualtimer" -typedef struct CMSDKAPBDualTimer CMSDKAPBDualTimer ; -DECLARE_INSTANCE_CHECKER (CMSDKAPBDualTimer,CMSDK_APB_DUALTIMER , -TYPE_CMSDK_APB_DUALTIMER ) +OBJECT_DECLARE_SIMPLE_TYPE (CMSDKAPBDualTimer,CMSDK_APB_DUALTIMER )/* One of the two identical timer modules in the dual-timer module */
include/hw/timer/cmsdk-apb-timer.h +1 -3
@@ -18,9 +18,7 @@#include "qom/object.h" #define TYPE_CMSDK_APB_TIMER "cmsdk-apb-timer" -typedef struct CMSDKAPBTIMER CMSDKAPBTIMER ; -DECLARE_INSTANCE_CHECKER (CMSDKAPBTIMER ,CMSDK_APB_TIMER , - TYPE_CMSDK_APB_TIMER) +OBJECT_DECLARE_SIMPLE_TYPE(CMSDKAPBTIMER, CMSDK_APB_TIMER)struct CMSDKAPBTIMER {/*< private >*/
include/hw/timer/digic-timer.h +1 -3
@@ -23,9 +23,7 @@#include "qom/object.h" #define TYPE_DIGIC_TIMER "digic-timer" -typedef struct DigicTimerState DigicTimerState ; -DECLARE_INSTANCE_CHECKER (DigicTimerState,DIGIC_TIMER , - TYPE_DIGIC_TIMER) +OBJECT_DECLARE_SIMPLE_TYPE(DigicTimerState, DIGIC_TIMER)#define DIGIC_TIMER_CONTROL 0x00#define DIGIC_TIMER_CONTROL_RST 0x80000000
include/hw/timer/imx_epit.h +1 -3
@@ -56,9 +56,7 @@#define EPIT_TIMER_MAX 0XFFFFFFFFUL#define TYPE_IMX_EPIT "imx.epit" -typedef struct IMXEPITState IMXEPITState ; -DECLARE_INSTANCE_CHECKER (IMXEPITState,IMX_EPIT , - TYPE_IMX_EPIT) +OBJECT_DECLARE_SIMPLE_TYPE(IMXEPITState, IMX_EPIT)struct IMXEPITState {/*< private >*/
include/hw/timer/mss-timer.h +1 -3
@@ -30,9 +30,7 @@#include "qom/object.h" #define TYPE_MSS_TIMER "mss-timer" -typedef struct MSSTimerState MSSTimerState ; -DECLARE_INSTANCE_CHECKER (MSSTimerState,MSS_TIMER , -TYPE_MSS_TIMER ) +OBJECT_DECLARE_SIMPLE_TYPE (MSSTimerState,MSS_TIMER )/* * There are two 32-bit down counting timers.
include/hw/timer/nrf51_timer.h +1 -3
@@ -17,9 +17,7 @@#include "qemu/timer.h" #include "qom/object.h" #define TYPE_NRF51_TIMER "nrf51_soc.timer" -typedef struct NRF51TimerState NRF51TimerState ; -DECLARE_INSTANCE_CHECKER (NRF51TimerState,NRF51_TIMER , - TYPE_NRF51_TIMER) +OBJECT_DECLARE_SIMPLE_TYPE(NRF51TimerState, NRF51_TIMER)#define NRF51_TIMER_REG_COUNT 4
include/hw/usb.h +1 -3
@@ -175,7 +175,6 @@#define USB_INTERFACE_INVALID 255 -typedef struct USBBus USBBus ;typedef struct USBBusOps USBBusOps ;typedef struct USBPort USBPort ;typedef struct USBDevice USBDevice ;
@@ -473,8 +472,7 @@ bool usb_host_dev_is_scsi_storage(USBDevice *usbdev);/* usb-bus.c */ #define TYPE_USB_BUS "usb-bus" -DECLARE_INSTANCE_CHECKER (USBBus,USB_BUS , - TYPE_USB_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(USBBus, USB_BUS)struct USBBus {BusState qbus;
include/hw/usb/chipidea.h +1 -3
@@ -10,10 +10,8 @@ struct ChipideaState {MemoryRegion iomem[3 ]; }; -typedef struct ChipideaState ChipideaState ;#define TYPE_CHIPIDEA "usb-chipidea" -DECLARE_INSTANCE_CHECKER (ChipideaState,CHIPIDEA , - TYPE_CHIPIDEA) +OBJECT_DECLARE_SIMPLE_TYPE(ChipideaState, CHIPIDEA)#endif /* CHIPIDEA_H */
include/hw/usb/imx-usb-phy.h +1 -3
@@ -39,9 +39,7 @@ enum IMXUsbPhyRegisters {#define USBPHY_CTRL_SFTRST BIT(31)#define TYPE_IMX_USBPHY "imx.usbphy" -typedef struct IMXUSBPHYState IMXUSBPHYState ; -DECLARE_INSTANCE_CHECKER (IMXUSBPHYState,IMX_USBPHY , - TYPE_IMX_USBPHY) +OBJECT_DECLARE_SIMPLE_TYPE(IMXUSBPHYState, IMX_USBPHY)struct IMXUSBPHYState {/* <private> */
include/hw/virtio/vhost-scsi-common.h +1 -3
@@ -20,9 +20,7 @@#include "qom/object.h" #define TYPE_VHOST_SCSI_COMMON "vhost-scsi-common" -typedef struct VHostSCSICommon VHostSCSICommon ; -DECLARE_INSTANCE_CHECKER (VHostSCSICommon,VHOST_SCSI_COMMON , - TYPE_VHOST_SCSI_COMMON) +OBJECT_DECLARE_SIMPLE_TYPE(VHostSCSICommon, VHOST_SCSI_COMMON)struct VHostSCSICommon {VirtIOSCSICommon parent_obj;
include/hw/virtio/vhost-scsi.h +1 -3
@@ -26,9 +26,7 @@ enum vhost_scsi_vq_list { };#define TYPE_VHOST_SCSI "vhost-scsi" -typedef struct VHostSCSI VHostSCSI ; -DECLARE_INSTANCE_CHECKER (VHostSCSI,VHOST_SCSI , - TYPE_VHOST_SCSI) +OBJECT_DECLARE_SIMPLE_TYPE(VHostSCSI, VHOST_SCSI)struct VHostSCSI {VHostSCSICommon parent_obj;
include/hw/virtio/vhost-user-blk.h +1 -3
@@ -23,9 +23,7 @@#include "qom/object.h" #define TYPE_VHOST_USER_BLK "vhost-user-blk" -typedef struct VHostUserBlk VHostUserBlk ; -DECLARE_INSTANCE_CHECKER (VHostUserBlk,VHOST_USER_BLK , - TYPE_VHOST_USER_BLK) +OBJECT_DECLARE_SIMPLE_TYPE(VHostUserBlk, VHOST_USER_BLK)#define VHOST_USER_BLK_AUTO_NUM_QUEUES UINT16_MAX
include/hw/virtio/vhost-user-fs.h +1 -3
@@ -21,9 +21,7 @@#include "qom/object.h" #define TYPE_VHOST_USER_FS "vhost-user-fs-device" -typedef struct VHostUserFS VHostUserFS ; -DECLARE_INSTANCE_CHECKER (VHostUserFS,VHOST_USER_FS , - TYPE_VHOST_USER_FS) +OBJECT_DECLARE_SIMPLE_TYPE(VHostUserFS, VHOST_USER_FS) typedef struct { CharBackend chardev;
include/hw/virtio/vhost-user-scsi.h +1 -3
@@ -24,9 +24,7 @@#include "qom/object.h" #define TYPE_VHOST_USER_SCSI "vhost-user-scsi" -typedef struct VHostUserSCSI VHostUserSCSI ; -DECLARE_INSTANCE_CHECKER (VHostUserSCSI,VHOST_USER_SCSI , - TYPE_VHOST_USER_SCSI) +OBJECT_DECLARE_SIMPLE_TYPE(VHostUserSCSI, VHOST_USER_SCSI)struct VHostUserSCSI {VHostSCSICommon parent_obj;
include/hw/virtio/vhost-user-vsock.h +1 -3
@@ -17,9 +17,7 @@#include "qom/object.h" #define TYPE_VHOST_USER_VSOCK "vhost-user-vsock-device" -typedef struct VHostUserVSock VHostUserVSock ; -DECLARE_INSTANCE_CHECKER (VHostUserVSock,VHOST_USER_VSOCK , - TYPE_VHOST_USER_VSOCK) +OBJECT_DECLARE_SIMPLE_TYPE(VHostUserVSock, VHOST_USER_VSOCK) typedef struct { CharBackend chardev;
include/hw/virtio/vhost-vsock-common.h +1 -3
@@ -16,9 +16,7 @@#include "qom/object.h" #define TYPE_VHOST_VSOCK_COMMON "vhost-vsock-common" -typedef struct VHostVSockCommon VHostVSockCommon ; -DECLARE_INSTANCE_CHECKER (VHostVSockCommon,VHOST_VSOCK_COMMON , - TYPE_VHOST_VSOCK_COMMON) +OBJECT_DECLARE_SIMPLE_TYPE(VHostVSockCommon, VHOST_VSOCK_COMMON)enum {VHOST_VSOCK_SAVEVM_VERSION =0 ,
include/hw/virtio/vhost-vsock.h +1 -3
@@ -18,9 +18,7 @@#include "qom/object.h" #define TYPE_VHOST_VSOCK "vhost-vsock-device" -typedef struct VHostVSock VHostVSock ; -DECLARE_INSTANCE_CHECKER (VHostVSock,VHOST_VSOCK , - TYPE_VHOST_VSOCK) +OBJECT_DECLARE_SIMPLE_TYPE(VHostVSock, VHOST_VSOCK) typedef struct { uint64_t guest_cid;
include/hw/virtio/virtio-balloon.h +1 -3
@@ -21,9 +21,7 @@#include "qom/object.h" #define TYPE_VIRTIO_BALLOON "virtio-balloon-device" -typedef struct VirtIOBalloon VirtIOBalloon ; -DECLARE_INSTANCE_CHECKER (VirtIOBalloon,VIRTIO_BALLOON , - TYPE_VIRTIO_BALLOON) +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOBalloon, VIRTIO_BALLOON)#define VIRTIO_BALLOON_FREE_PAGE_HINT_CMD_ID_MIN 0x80000000
include/hw/virtio/virtio-blk.h +1 -3
@@ -22,9 +22,7 @@#include "qom/object.h" #define TYPE_VIRTIO_BLK "virtio-blk-device" -typedef struct VirtIOBlock VirtIOBlock ; -DECLARE_INSTANCE_CHECKER (VirtIOBlock,VIRTIO_BLK , -TYPE_VIRTIO_BLK ) +OBJECT_DECLARE_SIMPLE_TYPE (VirtIOBlock,VIRTIO_BLK ) /* This is the last element of the write scatter-gather list */struct virtio_blk_inhdr
include/hw/virtio/virtio-crypto.h +1 -3
@@ -32,9 +32,7 @@ do { \#define TYPE_VIRTIO_CRYPTO "virtio-crypto-device" -typedef struct VirtIOCrypto VirtIOCrypto ; -DECLARE_INSTANCE_CHECKER (VirtIOCrypto,VIRTIO_CRYPTO , - TYPE_VIRTIO_CRYPTO) +OBJECT_DECLARE_SIMPLE_TYPE(VirtIOCrypto, VIRTIO_CRYPTO)#define VIRTIO_CRYPTO_GET_PARENT_CLASS (obj) \ OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_CRYPTO)
include/hw/virtio/virtio-gpu-pci.h +1 -3
@@ -18,14 +18,12 @@#include "hw/virtio/virtio-gpu.h" #include "qom/object.h" -typedef struct VirtIOGPUPCIBase VirtIOGPUPCIBase ;
Lines of this file are not shown. View the raw message.
include/hw/watchdog/cmsdk-apb-watchdog.h +1 -3
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.26.2
Part of the diff is not shown here. View the raw message.
[PULL 01/17] sifive_e: Rename memmap enum constants
In reply to Eduardo HabkostSome of the enum constant names conflict with a QOM type check macro (SIFIVE_E_PRCI). This needs to be addressed to allow us to transform the QOM type check macros into functions generated by OBJECT_DECLARE_TYPE().
Rename all the constants to SIFIVE_E_DEV_*, to avoid conflicts.
Message-Id: <[email protected]>
--- include/hw/riscv/sifive_e.h | 38 ++++++++--------- hw/riscv/sifive_e.c | 82 ++++++++++++++++++------------------- 2 files changed, 60 insertions(+), 60 deletions(-)
include/hw/riscv/sifive_e.h +19 -19
@@ -53,25 +53,25 @@ typedef struct SiFiveEState { OBJECT_CHECK(SiFiveEState, (obj), TYPE_RISCV_E_MACHINE)enum { -SIFIVE_E_DEBUG , -SIFIVE_E_MROM , -SIFIVE_E_OTP , -SIFIVE_E_CLINT , -SIFIVE_E_PLIC , -SIFIVE_E_AON , -SIFIVE_E_PRCI , -SIFIVE_E_OTP_CTRL , -SIFIVE_E_GPIO0 , -SIFIVE_E_UART0 , -SIFIVE_E_QSPI0 , -SIFIVE_E_PWM0 , -SIFIVE_E_UART1 , -SIFIVE_E_QSPI1 , -SIFIVE_E_PWM1 , -SIFIVE_E_QSPI2 , -SIFIVE_E_PWM2 , -SIFIVE_E_XIP , -SIFIVE_E_DTIM +SIFIVE_E_DEV_DEBUG , +SIFIVE_E_DEV_MROM , +SIFIVE_E_DEV_OTP , +SIFIVE_E_DEV_CLINT , +SIFIVE_E_DEV_PLIC , +SIFIVE_E_DEV_AON , +SIFIVE_E_DEV_PRCI , +SIFIVE_E_DEV_OTP_CTRL , +SIFIVE_E_DEV_GPIO0 , +SIFIVE_E_DEV_UART0 , +SIFIVE_E_DEV_QSPI0 , +SIFIVE_E_DEV_PWM0 , +SIFIVE_E_DEV_UART1 , +SIFIVE_E_DEV_QSPI1 , +SIFIVE_E_DEV_PWM1 , +SIFIVE_E_DEV_QSPI2 , +SIFIVE_E_DEV_PWM2 , +SIFIVE_E_DEV_XIP , +SIFIVE_E_DEV_DTIM };enum {
hw/riscv/sifive_e.c +41 -41
142 lines not on this page · raw message
Signature · 1 line
2.26.2
[PULL 08/17] qom: Allow objects to be allocated with increased alignment
In reply to Eduardo HabkostFrom: Richard Henderson <[email protected]>
It turns out that some hosts have a default malloc alignment less than that required for vectors.
We assume that, with compiler annotation on CPUArchState, that we can properly align the vector portion of the guest state. Fix the alignment of the allocation by using qemu_memalloc when required.
Message-Id: <[email protected]>
--- include/qom/object.h | 5 +++++ qom/object.c | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 38 insertions(+), 3 deletions(-)
include/qom/object.h +5 -0
@@ -691,6 +691,7 @@ struct Object .parent = TYPE_##PARENT_MODULE_OBJ_NAME, \ .name = TYPE_##MODULE_OBJ_NAME, \ .instance_size = sizeof(ModuleObjName), \ + .instance_align = __alignof__(ModuleObjName), \ .instance_init = module_obj_name##_init, \ .instance_finalize = module_obj_name##_finalize, \ .class_size = sizeof(ModuleObjName##Class), \
@@ -770,6 +771,9 @@ struct Object* @instance_size: The size of the object (derivative of #Object). If * @instance_size is 0, then the size of the object will be the size of the * parent object. +* @instance_align: The required alignment of the object. If @instance_align +* is 0, then normal malloc alignment is sufficient; if non-zero, then we +* must use qemu_memalign for allocation. * @instance_init: This function is called to initialize an object. The parent * class will have already been initialized so the type is only responsible * for initializing its own members.
@@ -807,6 +811,7 @@ struct TypeInfoconst char *parent;size_t instance_size; +size_t instance_align;void (*instance_init)(Object *obj);void (*instance_post_init)(Object *obj);void (*instance_finalize)(Object *obj);
qom/object.c +33 -3
@@ -50,6 +50,7 @@ struct TypeImplsize_t class_size;size_t instance_size; +size_t instance_align;void (*class_init)(ObjectClass *klass,void *data);void (*class_base_init)(ObjectClass *klass,void *data);
@@ -114,6 +115,7 @@ static TypeImpl *type_new(const TypeInfo *info) ti->class_size = info->class_size; ti->instance_size = info->instance_size; + ti->instance_align = info->instance_align; ti->class_init = info->class_init; ti->class_base_init = info->class_base_init;
@@ -688,16 +690,44 @@ static void object_finalize(void *data) } } +/* Find the minimum alignment guaranteed by the system malloc. */ +#if __STDC_VERSION__ >=201112L +typddef max_align_t qemu_max_align_t; +#else +typedef union { +long l; +void *p; +double d; +long double ld; +}qemu_max_align_t ; +#endif +static Object *object_new_with_type (Type type) {Object *obj; +size_t size, align; +void (*obj_free)(void *);g_assert (type !=NULL );type_initialize (type); - obj =g_malloc (type->instance_size); -object_initialize_with_type (obj, type->instance_size, type); - obj->free = g_free; + size = type->instance_size; + align = type->instance_align; + +/* +* Do not use qemu_memalign unless required. Depending on the +* implementation, extra alignment implies extra overhead. +*/ +if (likely (align <= __alignof__(qemu_max_align_t ))) { + obj =g_malloc (size); + obj_free = g_free; + }else { + obj =qemu_memalign (align, size); + obj_free = qemu_vfree; + } + +object_initialize_with_type (obj, size, type); + obj->free = obj_free;return obj; }
Signature · 1 line
2.26.2
[PULL 11/17] target/riscv: Set instance_align on RISCVCPU TypeInfo
In reply to Eduardo HabkostFrom: Richard Henderson <[email protected]>
Fix alignment of CPURISCVState.vreg.
Message-Id: <[email protected]>
--- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+)
target/riscv/cpu.c +1 -0
@@ -628,6 +628,7 @@ static const TypeInfo riscv_cpu_type_infos[] = { .name = TYPE_RISCV_CPU, .parent = TYPE_CPU, .instance_size = sizeof(RISCVCPU), + .instance_align = __alignof__(RISCVCPU), .instance_init = riscv_cpu_init, .abstract = true, .class_size = sizeof(RISCVCPUClass),
Signature · 1 line
2.26.2
[PULL 15/17] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
In reply to Eduardo HabkostOne of the goals of having less boilerplate on QOM declarations is to avoid human error. Requiring an extra argument that is never used is an opportunity for mistakes.
Remove the unused argument from OBJECT_DECLARE_TYPE and OBJECT_DECLARE_SIMPLE_TYPE.
Coccinelle patch used to convert all users of the macros:
@@
declarer name OBJECT_DECLARE_TYPE;
identifier InstanceType, ClassType, lowercase, UPPERCASE; @@
OBJECT_DECLARE_TYPE(InstanceType, ClassType,
- lowercase,
UPPERCASE);
@@
declarer name OBJECT_DECLARE_SIMPLE_TYPE;
identifier InstanceType, lowercase, UPPERCASE;
@@
OBJECT_DECLARE_SIMPLE_TYPE(InstanceType,
- lowercase,
UPPERCASE);
Message-Id: <[email protected]>
--- hw/audio/intel-hda.h | 2 +- hw/display/virtio-vga.h | 2 +- include/authz/base.h | 2 +- include/authz/list.h | 2 +- include/authz/listfile.h | 2 +- include/authz/pamacct.h | 2 +- include/authz/simple.h | 2 +- include/crypto/secret_common.h | 2 +- include/crypto/secret_keyring.h | 2 +- include/hw/arm/armsse.h | 2 +- include/hw/hyperv/vmbus.h | 2 +- include/hw/i2c/i2c.h | 2 +- include/hw/i2c/smbus_slave.h | 2 +- include/hw/ipack/ipack.h | 2 +- include/hw/ipmi/ipmi.h | 2 +- include/hw/mem/pc-dimm.h | 2 +- include/hw/ppc/pnv.h | 2 +- include/hw/ppc/pnv_core.h | 2 +- include/hw/ppc/pnv_homer.h | 2 +- include/hw/ppc/pnv_occ.h | 2 +- include/hw/ppc/pnv_psi.h | 2 +- include/hw/ppc/pnv_xive.h | 2 +- include/hw/ppc/spapr_cpu_core.h | 2 +- include/hw/ppc/spapr_vio.h | 2 +- include/hw/ppc/xics.h | 2 +- include/hw/ppc/xive.h | 2 +- include/hw/s390x/event-facility.h | 2 +- include/hw/s390x/s390_flic.h | 2 +- include/hw/s390x/sclp.h | 2 +- include/hw/sd/sd.h | 2 +- include/hw/ssi/ssi.h | 2 +- include/hw/sysbus.h | 2 +- include/hw/virtio/virtio-gpu.h | 2 +- include/hw/virtio/virtio-input.h | 2 +- include/hw/virtio/virtio-mem.h | 2 +- include/hw/virtio/virtio-pmem.h | 2 +- include/hw/virtio/virtio-serial.h | 2 +- include/hw/xen/xen-bus.h | 2 +- include/io/channel.h | 2 +- include/io/dns-resolver.h | 2 +- include/io/net-listener.h | 2 +- include/qom/object.h | 6 ++---- include/scsi/pr-manager.h | 2 +- include/sysemu/cryptodev.h | 2 +- include/sysemu/hostmem.h | 2 +- include/sysemu/rng.h | 2 +- include/sysemu/tpm_backend.h | 2 +- include/sysemu/vhost-user-backend.h | 2 +- target/alpha/cpu-qom.h | 2 +- target/arm/cpu-qom.h | 2 +- target/avr/cpu-qom.h | 2 +- target/cris/cpu-qom.h | 2 +- target/hppa/cpu-qom.h | 2 +- target/i386/cpu-qom.h | 2 +- target/lm32/cpu-qom.h | 2 +- target/m68k/cpu-qom.h | 2 +- target/microblaze/cpu-qom.h | 2 +- target/mips/cpu-qom.h | 2 +- target/moxie/cpu.h | 2 +- target/nios2/cpu.h | 2 +- target/openrisc/cpu.h | 2 +- target/ppc/cpu-qom.h | 2 +- target/riscv/cpu.h | 2 +- target/rx/cpu-qom.h | 2 +- target/s390x/cpu-qom.h | 2 +- target/sh4/cpu-qom.h | 2 +- target/sparc/cpu-qom.h | 2 +- target/tilegx/cpu.h | 2 +- target/tricore/cpu-qom.h | 2 +- target/unicore32/cpu-qom.h | 2 +- target/xtensa/cpu-qom.h | 2 +- backends/dbus-vmstate.c | 2 +- ui/input-barrier.c | 2 +- ui/input-linux.c | 2 +- 74 files changed, 75 insertions(+), 77 deletions(-)
hw/audio/intel-hda.h +1 -1
@@ -9,7 +9,7 @@#define TYPE_HDA_CODEC_DEVICE "hda-codec"OBJECT_DECLARE_TYPE (HDACodecDevice, HDACodecDeviceClass, - hda_codec_device, HDA_CODEC_DEVICE) + HDA_CODEC_DEVICE)#define TYPE_HDA_BUS "HDA"typedef struct HDACodecBus HDACodecBus ;
hw/display/virtio-vga.h +1 -1
@@ -10,7 +10,7 @@*/ #define TYPE_VIRTIO_VGA_BASE "virtio-vga-base"OBJECT_DECLARE_TYPE (VirtIOVGABase, VirtIOVGABaseClass, - virtio_vga_base, VIRTIO_VGA_BASE) + VIRTIO_VGA_BASE)struct VirtIOVGABase {VirtIOPCIProxy parent_obj;
include/authz/base.h +1 -1
@@ -28,7 +28,7 @@#define TYPE_QAUTHZ "authz"OBJECT_DECLARE_TYPE (QAuthZ, QAuthZClass, - qauthz,QAUTHZ ) +QAUTHZ )/**
include/authz/list.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_QAUTHZ_LIST "authz-list" -OBJECT_DECLARE_SIMPLE_TYPE (QAuthZList, qauthz_list, +OBJECT_DECLARE_SIMPLE_TYPE (QAuthZList,QAUTHZ_LIST )
include/authz/listfile.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_QAUTHZ_LIST_FILE "authz-list-file" -OBJECT_DECLARE_SIMPLE_TYPE (QAuthZListFile, qauthz_list_file, +OBJECT_DECLARE_SIMPLE_TYPE (QAuthZListFile,QAUTHZ_LIST_FILE )
include/authz/pamacct.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_QAUTHZ_PAM "authz-pam" -OBJECT_DECLARE_SIMPLE_TYPE (QAuthZPAM, qauthz_pam, +OBJECT_DECLARE_SIMPLE_TYPE (QAuthZPAM,QAUTHZ_PAM )
include/authz/simple.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_QAUTHZ_SIMPLE "authz-simple" -OBJECT_DECLARE_SIMPLE_TYPE (QAuthZSimple, qauthz_simple, +OBJECT_DECLARE_SIMPLE_TYPE (QAuthZSimple,QAUTHZ_SIMPLE )
include/crypto/secret_common.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_QCRYPTO_SECRET_COMMON "secret_common"OBJECT_DECLARE_TYPE (QCryptoSecretCommon, QCryptoSecretCommonClass, - qcrypto_secret_common, QCRYPTO_SECRET_COMMON) + QCRYPTO_SECRET_COMMON)struct QCryptoSecretCommon {
include/crypto/secret_keyring.h +1 -1
@@ -26,7 +26,7 @@#include "crypto/secret_common.h" #define TYPE_QCRYPTO_SECRET_KEYRING "secret_keyring" -OBJECT_DECLARE_SIMPLE_TYPE (QCryptoSecretKeyring, qcrypto_secret_keyring, +OBJECT_DECLARE_SIMPLE_TYPE (QCryptoSecretKeyring,QCRYPTO_SECRET_KEYRING )
include/hw/arm/armsse.h +1 -1
@@ -109,7 +109,7 @@#define TYPE_ARM_SSE "arm-sse"OBJECT_DECLARE_TYPE (ARMSSE , ARMSSEClass, - arm_sse,ARM_SSE ) +ARM_SSE )/* * These type names are for specific IoTKit subsystems; other than
include/hw/hyperv/vmbus.h +1 -1
@@ -21,7 +21,7 @@#define TYPE_VMBUS_DEVICE "vmbus-dev"OBJECT_DECLARE_TYPE (VMBusDevice, VMBusDeviceClass, - vmbus_device, VMBUS_DEVICE) + VMBUS_DEVICE)#define TYPE_VMBUS "vmbus"typedef struct VMBus VMBus ;
include/hw/i2c/i2c.h +1 -1
@@ -19,7 +19,7 @@ enum i2c_event {#define TYPE_I2C_SLAVE "i2c-slave"OBJECT_DECLARE_TYPE (I2CSlave, I2CSlaveClass, - i2c_slave, I2C_SLAVE) + I2C_SLAVE)struct I2CSlaveClass {DeviceClass parent_class;
include/hw/i2c/smbus_slave.h +1 -1
@@ -30,7 +30,7 @@#define TYPE_SMBUS_DEVICE "smbus-device"OBJECT_DECLARE_TYPE (SMBusDevice, SMBusDeviceClass, - smbus_device, SMBUS_DEVICE) + SMBUS_DEVICE)struct SMBusDeviceClass {
include/hw/ipack/ipack.h +1 -1
@@ -33,7 +33,7 @@ struct IPackBus {#define TYPE_IPACK_DEVICE "ipack-device"OBJECT_DECLARE_TYPE (IPackDevice, IPackDeviceClass, - ipack_device, IPACK_DEVICE) + IPACK_DEVICE)struct IPackDeviceClass {/*< private >*/
include/hw/ipmi/ipmi.h +1 -1
@@ -177,7 +177,7 @@ struct IPMIInterfaceClass {*/ #define TYPE_IPMI_BMC "ipmi-bmc"OBJECT_DECLARE_TYPE (IPMIBmc, IPMIBmcClass, - ipmi_bmc, IPMI_BMC) + IPMI_BMC)struct IPMIBmc {DeviceState parent;
include/hw/mem/pc-dimm.h +1 -1
@@ -22,7 +22,7 @@#define TYPE_PC_DIMM "pc-dimm"OBJECT_DECLARE_TYPE (PCDIMMDevice, PCDIMMDeviceClass, - pc_dimm, PC_DIMM) + PC_DIMM)#define PC_DIMM_ADDR_PROP "addr"#define PC_DIMM_SLOT_PROP "slot"
include/hw/ppc/pnv.h +1 -1
@@ -36,7 +36,7 @@#define TYPE_PNV_CHIP "pnv-chip"OBJECT_DECLARE_TYPE (PnvChip, PnvChipClass, - pnv_chip, PNV_CHIP) + PNV_CHIP)struct PnvChip {/*< private >*/
include/hw/ppc/pnv_core.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_PNV_CORE "powernv-cpu-core"OBJECT_DECLARE_TYPE (PnvCore, PnvCoreClass, - pnv_core, PNV_CORE) + PNV_CORE)typedef struct PnvChip PnvChip ;
include/hw/ppc/pnv_homer.h +1 -1
@@ -25,7 +25,7 @@#define TYPE_PNV_HOMER "pnv-homer"OBJECT_DECLARE_TYPE (PnvHomer, PnvHomerClass, - pnv_homer, PNV_HOMER) + PNV_HOMER)#define TYPE_PNV8_HOMER TYPE_PNV_HOMER "-POWER8"DECLARE_INSTANCE_CHECKER (PnvHomer,PNV8_HOMER ,TYPE_PNV8_HOMER )
include/hw/ppc/pnv_occ.h +1 -1
@@ -25,7 +25,7 @@#define TYPE_PNV_OCC "pnv-occ"OBJECT_DECLARE_TYPE (PnvOCC, PnvOCCClass, - pnv_occ, PNV_OCC) + PNV_OCC)#define TYPE_PNV8_OCC TYPE_PNV_OCC "-POWER8"DECLARE_INSTANCE_CHECKER (PnvOCC,PNV8_OCC ,TYPE_PNV8_OCC )
include/hw/ppc/pnv_psi.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_PNV_PSI "pnv-psi"OBJECT_DECLARE_TYPE (PnvPsi, PnvPsiClass, - pnv_psi, PNV_PSI) + PNV_PSI)#define PSIHB_XSCOM_MAX 0x20
include/hw/ppc/pnv_xive.h +1 -1
@@ -17,7 +17,7 @@ struct PnvChip;#define TYPE_PNV_XIVE "pnv-xive"OBJECT_DECLARE_TYPE (PnvXive, PnvXiveClass, - pnv_xive, PNV_XIVE) + PNV_XIVE)#define XIVE_BLOCK_MAX 16
include/hw/ppc/spapr_cpu_core.h +1 -1
@@ -17,7 +17,7 @@#define TYPE_SPAPR_CPU_CORE "spapr-cpu-core"OBJECT_DECLARE_TYPE (SpaprCpuCore, SpaprCpuCoreClass, - spapr_cpu_core, SPAPR_CPU_CORE) + SPAPR_CPU_CORE)#define SPAPR_CPU_CORE_TYPE_NAME (model) model "-" TYPE_SPAPR_CPU_CORE
include/hw/ppc/spapr_vio.h +1 -1
@@ -29,7 +29,7 @@#define TYPE_VIO_SPAPR_DEVICE "vio-spapr-device"OBJECT_DECLARE_TYPE (SpaprVioDevice, SpaprVioDeviceClass, - vio_spapr_device, VIO_SPAPR_DEVICE) + VIO_SPAPR_DEVICE)#define TYPE_SPAPR_VIO_BUS "spapr-vio-bus"typedef struct SpaprVioBus SpaprVioBus ;
include/hw/ppc/xics.h +1 -1
@@ -49,7 +49,7 @@ typedef struct XICSFabric XICSFabric;#define TYPE_ICP "icp"OBJECT_DECLARE_TYPE (ICPState, ICPStateClass, - icp, ICP) + ICP)#define TYPE_PNV_ICP "pnv-icp" DECLARE_INSTANCE_CHECKER(PnvICPState, PNV_ICP,
include/hw/ppc/xive.h +1 -1
@@ -348,7 +348,7 @@ struct XiveRouter {#define TYPE_XIVE_ROUTER "xive-router"OBJECT_DECLARE_TYPE (XiveRouter, XiveRouterClass, - xive_router, XIVE_ROUTER) + XIVE_ROUTER)struct XiveRouterClass {SysBusDeviceClass parent;
include/hw/s390x/event-facility.h +1 -1
@@ -43,7 +43,7 @@#define TYPE_SCLP_EVENT "s390-sclp-event-type"OBJECT_DECLARE_TYPE (SCLPEvent, SCLPEventClass, - sclp_event, SCLP_EVENT) + SCLP_EVENT)#define TYPE_SCLP_CPU_HOTPLUG "sclp-cpu-hotplug"#define TYPE_SCLP_QUIESCE "sclpquiesce"
include/hw/s390x/s390_flic.h +1 -1
@@ -40,7 +40,7 @@ extern const VMStateDescription vmstate_adapter_routes;#define TYPE_S390_FLIC_COMMON "s390-flic"OBJECT_DECLARE_TYPE (S390FLICState, S390FLICStateClass, - s390_flic_common, S390_FLIC_COMMON) + S390_FLIC_COMMON)struct S390FLICState {SysBusDevice parent_obj;
include/hw/s390x/sclp.h +1 -1
@@ -183,7 +183,7 @@ typedef struct SCCB {#define TYPE_SCLP "sclp"OBJECT_DECLARE_TYPE (SCLPDevice, SCLPDeviceClass, - sclp, SCLP) + SCLP)struct SCLPEventFacility ;
include/hw/sd/sd.h +1 -1
@@ -130,7 +130,7 @@ struct SDCardClass {#define TYPE_SD_BUS "sd-bus"OBJECT_DECLARE_TYPE (SDBus, SDBusClass, - sd_bus, SD_BUS) + SD_BUS)struct SDBus {BusState qbus;
include/hw/ssi/ssi.h +1 -1
@@ -18,7 +18,7 @@ typedef enum SSICSMode SSICSMode;#define TYPE_SSI_SLAVE "ssi-slave"OBJECT_DECLARE_TYPE (SSISlave, SSISlaveClass, - ssi_slave, SSI_SLAVE) + SSI_SLAVE)#define SSI_GPIO_CS "ssi-gpio-cs"
include/hw/sysbus.h +1 -1
@@ -17,7 +17,7 @@ DECLARE_INSTANCE_CHECKER(BusState, SYSTEM_BUS,#define TYPE_SYS_BUS_DEVICE "sys-bus-device"OBJECT_DECLARE_TYPE (SysBusDevice, SysBusDeviceClass, - sys_bus_device,SYS_BUS_DEVICE ) +SYS_BUS_DEVICE )/** * SysBusDeviceClass:
include/hw/virtio/virtio-gpu.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_VIRTIO_GPU_BASE "virtio-gpu-base"OBJECT_DECLARE_TYPE (VirtIOGPUBase, VirtIOGPUBaseClass, - virtio_gpu_base, VIRTIO_GPU_BASE) + VIRTIO_GPU_BASE)#define TYPE_VIRTIO_GPU "virtio-gpu-device"typedef struct VirtIOGPU VirtIOGPU ;
include/hw/virtio/virtio-input.h +1 -1
@@ -20,7 +20,7 @@ typedef struct virtio_input_event virtio_input_event;#define TYPE_VIRTIO_INPUT "virtio-input-device"OBJECT_DECLARE_TYPE (VirtIOInput, VirtIOInputClass, - virtio_input, VIRTIO_INPUT) + VIRTIO_INPUT)#define VIRTIO_INPUT_GET_PARENT_CLASS (obj) \ OBJECT_GET_PARENT_CLASS(obj, TYPE_VIRTIO_INPUT)
include/hw/virtio/virtio-mem.h +1 -1
@@ -22,7 +22,7 @@#define TYPE_VIRTIO_MEM "virtio-mem"OBJECT_DECLARE_TYPE (VirtIOMEM, VirtIOMEMClass, - virtio_mem, VIRTIO_MEM) + VIRTIO_MEM)#define VIRTIO_MEM_MEMDEV_PROP "memdev"#define VIRTIO_MEM_NODE_PROP "node"
include/hw/virtio/virtio-pmem.h +1 -1
@@ -21,7 +21,7 @@#define TYPE_VIRTIO_PMEM "virtio-pmem"OBJECT_DECLARE_TYPE (VirtIOPMEM, VirtIOPMEMClass, - virtio_pmem, VIRTIO_PMEM) + VIRTIO_PMEM)#define VIRTIO_PMEM_ADDR_PROP "memaddr"#define VIRTIO_PMEM_MEMDEV_PROP "memdev"
include/hw/virtio/virtio-serial.h +1 -1
@@ -27,7 +27,7 @@ struct virtio_serial_conf {#define TYPE_VIRTIO_SERIAL_PORT "virtio-serial-port"OBJECT_DECLARE_TYPE (VirtIOSerialPort, VirtIOSerialPortClass, - virtio_serial_port, VIRTIO_SERIAL_PORT) + VIRTIO_SERIAL_PORT)typedef struct VirtIOSerial VirtIOSerial ;
include/hw/xen/xen-bus.h +1 -1
@@ -79,7 +79,7 @@ struct XenBusClass {#define TYPE_XEN_BUS "xen-bus"OBJECT_DECLARE_TYPE (XenBus, XenBusClass, - xen_bus, XEN_BUS) + XEN_BUS)void xen_bus_init (void );
include/io/channel.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_QIO_CHANNEL "qio-channel"OBJECT_DECLARE_TYPE (QIOChannel, QIOChannelClass, - qio_channel, QIO_CHANNEL) + QIO_CHANNEL)#define QIO_CHANNEL_ERR_BLOCK -2
include/io/dns-resolver.h +1 -1
@@ -26,7 +26,7 @@#include "io/task.h" #define TYPE_QIO_DNS_RESOLVER "qio-dns-resolver" -OBJECT_DECLARE_SIMPLE_TYPE (QIODNSResolver, qio_dns_resolver, +OBJECT_DECLARE_SIMPLE_TYPE (QIODNSResolver,QIO_DNS_RESOLVER )
include/io/net-listener.h +1 -1
@@ -25,7 +25,7 @@#include "qom/object.h" #define TYPE_QIO_NET_LISTENER "qio-net-listener" -OBJECT_DECLARE_SIMPLE_TYPE (QIONetListener, qio_net_listener, +OBJECT_DECLARE_SIMPLE_TYPE (QIONetListener,QIO_NET_LISTENER )
include/qom/object.h +2 -4
@@ -614,7 +614,6 @@ struct Object* OBJECT_DECLARE_TYPE: * @InstanceType: instance struct name * @ClassType: class struct name -* @module_obj_name: the object name in lowercase with underscore separators * @MODULE_OBJ_NAME: the object name in uppercase with underscore separators * * This macro is typically used in a header file, and will:
@@ -625,7 +624,7 @@ struct Object* * The object struct and class struct need to be declared manually. */ -#define OBJECT_DECLARE_TYPE (InstanceType, ClassType, module_obj_name,MODULE_OBJ_NAME ) \ +#define OBJECT_DECLARE_TYPE (InstanceType, ClassType,MODULE_OBJ_NAME ) \ typedef struct InstanceType InstanceType; \ typedef struct ClassType ClassType; \ \
@@ -637,7 +636,6 @@ struct Object/** * OBJECT_DECLARE_SIMPLE_TYPE: * @InstanceType: instance struct name -* @module_obj_name: the object name in lowercase with underscore separators * @MODULE_OBJ_NAME: the object name in uppercase with underscore separators * * This does the same as OBJECT_DECLARE_TYPE(), but with no class struct
@@ -646,7 +644,7 @@ struct Object* This macro should be used unless the class struct needs to have * virtual methods declared. */ -#define OBJECT_DECLARE_SIMPLE_TYPE (InstanceType, module_obj_name,MODULE_OBJ_NAME ) \ +#define OBJECT_DECLARE_SIMPLE_TYPE (InstanceType,MODULE_OBJ_NAME ) \ typedef struct InstanceType InstanceType; \ \ G_DEFINE_AUTOPTR_CLEANUP_FUNC(InstanceType, object_unref) \
include/scsi/pr-manager.h +1 -1
@@ -10,7 +10,7 @@#define TYPE_PR_MANAGER "pr-manager"OBJECT_DECLARE_TYPE (PRManager, PRManagerClass, - pr_manager, PR_MANAGER) + PR_MANAGER)struct sg_io_hdr ;
include/sysemu/cryptodev.h +1 -1
@@ -38,7 +38,7 @@#define TYPE_CRYPTODEV_BACKEND "cryptodev-backend"OBJECT_DECLARE_TYPE (CryptoDevBackend, CryptoDevBackendClass, - cryptodev_backend, CRYPTODEV_BACKEND) + CRYPTODEV_BACKEND)#define MAX_CRYPTO_QUEUE_NUM 64
include/sysemu/hostmem.h +1 -1
@@ -21,7 +21,7 @@#define TYPE_MEMORY_BACKEND "memory-backend"OBJECT_DECLARE_TYPE (HostMemoryBackend, HostMemoryBackendClass, - memory_backend,MEMORY_BACKEND ) +MEMORY_BACKEND )/* hostmem-ram.c */ /**
include/sysemu/rng.h +1 -1
@@ -18,7 +18,7 @@#define TYPE_RNG_BACKEND "rng-backend"OBJECT_DECLARE_TYPE (RngBackend, RngBackendClass, - rng_backend, RNG_BACKEND) + RNG_BACKEND)#define TYPE_RNG_BUILTIN "rng-builtin"
include/sysemu/tpm_backend.h +1 -1
@@ -20,7 +20,7 @@#define TYPE_TPM_BACKEND "tpm-backend"OBJECT_DECLARE_TYPE (TPMBackend, TPMBackendClass, - tpm_backend, TPM_BACKEND) + TPM_BACKEND) typedef struct TPMBackendCmd {
include/sysemu/vhost-user-backend.h +1 -1
@@ -22,7 +22,7 @@#include "io/channel.h" #define TYPE_VHOST_USER_BACKEND "vhost-user-backend" -OBJECT_DECLARE_SIMPLE_TYPE (VhostUserBackend, vhost_user_backend, +OBJECT_DECLARE_SIMPLE_TYPE (VhostUserBackend,VHOST_USER_BACKEND )
target/alpha/cpu-qom.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_ALPHA_CPU "alpha-cpu"OBJECT_DECLARE_TYPE (AlphaCPU, AlphaCPUClass, - alpha_cpu,ALPHA_CPU ) +ALPHA_CPU )/** * AlphaCPUClass:
target/arm/cpu-qom.h +1 -1
@@ -28,7 +28,7 @@ struct arm_boot_info;#define TYPE_ARM_CPU "arm-cpu"OBJECT_DECLARE_TYPE (ARMCPU , ARMCPUClass, - arm_cpu, ARM_CPU) + ARM_CPU)#define TYPE_ARM_MAX_CPU "max-" TYPE_ARM_CPU
target/avr/cpu-qom.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_AVR_CPU "avr-cpu"OBJECT_DECLARE_TYPE (AVRCPU , AVRCPUClass, - avr_cpu,AVR_CPU ) +AVR_CPU )/** * AVRCPUClass:
target/cris/cpu-qom.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_CRIS_CPU "cris-cpu"OBJECT_DECLARE_TYPE (CRISCPU , CRISCPUClass, - cris_cpu,CRIS_CPU ) +CRIS_CPU )/** * CRISCPUClass:
target/hppa/cpu-qom.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_HPPA_CPU "hppa-cpu"OBJECT_DECLARE_TYPE (HPPACPU , HPPACPUClass, - hppa_cpu,HPPA_CPU ) +HPPA_CPU )/** * HPPACPUClass:
target/i386/cpu-qom.h +1 -1
@@ -31,7 +31,7 @@#endif OBJECT_DECLARE_TYPE (X86CPU , X86CPUClass, - x86_cpu, X86_CPU) + X86_CPU)typedef struct X86CPUModel X86CPUModel ;
target/lm32/cpu-qom.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_LM32_CPU "lm32-cpu"OBJECT_DECLARE_TYPE (LM32CPU , LM32CPUClass, - lm32_cpu,LM32_CPU ) +LM32_CPU )/** * LM32CPUClass:
target/m68k/cpu-qom.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_M68K_CPU "m68k-cpu"OBJECT_DECLARE_TYPE (M68kCPU, M68kCPUClass, - m68k_cpu,M68K_CPU ) +M68K_CPU )/* * M68kCPUClass:
target/microblaze/cpu-qom.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_MICROBLAZE_CPU "microblaze-cpu"OBJECT_DECLARE_TYPE (MicroBlazeCPU, MicroBlazeCPUClass, - microblaze_cpu,MICROBLAZE_CPU ) +MICROBLAZE_CPU )/** * MicroBlazeCPUClass:
target/mips/cpu-qom.h +1 -1
@@ -30,7 +30,7 @@#endif OBJECT_DECLARE_TYPE (MIPSCPU , MIPSCPUClass, - mips_cpu,MIPS_CPU ) +MIPS_CPU )/** * MIPSCPUClass:
target/moxie/cpu.h +1 -1
@@ -52,7 +52,7 @@ typedef struct CPUMoxieState {#define TYPE_MOXIE_CPU "moxie-cpu"OBJECT_DECLARE_TYPE (MoxieCPU, MoxieCPUClass, - moxie_cpu,MOXIE_CPU ) +MOXIE_CPU )/** * MoxieCPUClass:
target/nios2/cpu.h +1 -1
@@ -33,7 +33,7 @@ typedef struct CPUNios2State CPUNios2State;#define TYPE_NIOS2_CPU "nios2-cpu"OBJECT_DECLARE_TYPE (Nios2CPU, Nios2CPUClass, - nios2_cpu,NIOS2_CPU ) +NIOS2_CPU )/** * Nios2CPUClass:
target/openrisc/cpu.h +1 -1
@@ -30,7 +30,7 @@ struct OpenRISCCPU;#define TYPE_OPENRISC_CPU "or1k-cpu"OBJECT_DECLARE_TYPE (OpenRISCCPU, OpenRISCCPUClass, - openrisc_cpu,OPENRISC_CPU ) +OPENRISC_CPU )/** * OpenRISCCPUClass:
target/ppc/cpu-qom.h +1 -1
@@ -30,7 +30,7 @@#endif OBJECT_DECLARE_TYPE (PowerPCCPU, PowerPCCPUClass, - powerpc_cpu, POWERPC_CPU) + POWERPC_CPU)typedef struct CPUPPCState CPUPPCState ;typedef struct ppc_tb_t ppc_tb_t ;
target/riscv/cpu.h +1 -1
@@ -234,7 +234,7 @@ struct CPURISCVState { };OBJECT_DECLARE_TYPE (RISCVCPU , RISCVCPUClass, - riscv_cpu,RISCV_CPU ) +RISCV_CPU )/** * RISCVCPUClass:
target/rx/cpu-qom.h +1 -1
@@ -27,7 +27,7 @@#define TYPE_RX62N_CPU RX_CPU_TYPE_NAME("rx62n")OBJECT_DECLARE_TYPE (RXCPU , RXCPUClass, - rx_cpu,RX_CPU ) +RX_CPU )/* * RXCPUClass:
target/s390x/cpu-qom.h +1 -1
@@ -26,7 +26,7 @@#define TYPE_S390_CPU "s390x-cpu"OBJECT_DECLARE_TYPE (S390CPU , S390CPUClass, - s390_cpu, S390_CPU) + S390_CPU)typedef struct S390CPUModel S390CPUModel ;typedef struct S390CPUDef S390CPUDef ;
target/sh4/cpu-qom.h +1 -1
@@ -30,7 +30,7 @@#define TYPE_SH7785_CPU SUPERH_CPU_TYPE_NAME("sh7785")OBJECT_DECLARE_TYPE (SuperHCPU, SuperHCPUClass, - superh_cpu,SUPERH_CPU ) +SUPERH_CPU )/** * SuperHCPUClass:
target/sparc/cpu-qom.h +1 -1
@@ -30,7 +30,7 @@#endif OBJECT_DECLARE_TYPE (SPARCCPU , SPARCCPUClass, - sparc_cpu, SPARC_CPU) + SPARC_CPU)typedef struct sparc_def_t sparc_def_t ;/**
target/tilegx/cpu.h +1 -1
@@ -100,7 +100,7 @@ typedef struct CPUTLGState {#define TYPE_TILEGX_CPU "tilegx-cpu"OBJECT_DECLARE_TYPE (TileGXCPU, TileGXCPUClass, - tilegx_cpu,TILEGX_CPU ) +TILEGX_CPU )/** * TileGXCPUClass:
target/tricore/cpu-qom.h +1 -1
@@ -25,7 +25,7 @@#define TYPE_TRICORE_CPU "tricore-cpu"OBJECT_DECLARE_TYPE (TriCoreCPU, TriCoreCPUClass, - tricore_cpu, TRICORE_CPU) + TRICORE_CPU)struct TriCoreCPUClass {/*< private >*/
target/unicore32/cpu-qom.h +1 -1
@@ -17,7 +17,7 @@#define TYPE_UNICORE32_CPU "unicore32-cpu"OBJECT_DECLARE_TYPE (UniCore32CPU, UniCore32CPUClass, - unicore32_cpu,UNICORE32_CPU ) +UNICORE32_CPU )/** * UniCore32CPUClass:
target/xtensa/cpu-qom.h +1 -1
@@ -35,7 +35,7 @@#define TYPE_XTENSA_CPU "xtensa-cpu"OBJECT_DECLARE_TYPE (XtensaCPU, XtensaCPUClass, - xtensa_cpu, XTENSA_CPU) + XTENSA_CPU)typedef struct XtensaConfig XtensaConfig ;
backends/dbus-vmstate.c +1 -1
@@ -23,7 +23,7 @@#define TYPE_DBUS_VMSTATE "dbus-vmstate" -OBJECT_DECLARE_SIMPLE_TYPE (DBusVMState, dbus_vmstate, +OBJECT_DECLARE_SIMPLE_TYPE (DBusVMState,DBUS_VMSTATE )
ui/input-barrier.c +1 -1
@@ -20,7 +20,7 @@#include "input-barrier.h" #define TYPE_INPUT_BARRIER "input-barrier" -OBJECT_DECLARE_SIMPLE_TYPE (InputBarrier, input_barrier, +OBJECT_DECLARE_SIMPLE_TYPE (InputBarrier,INPUT_BARRIER )
ui/input-linux.c +1 -1
@@ -31,7 +31,7 @@ static bool linux_is_button(unsigned int lnx) }#define TYPE_INPUT_LINUX "input-linux" -OBJECT_DECLARE_SIMPLE_TYPE (InputLinux, input_linux, +OBJECT_DECLARE_SIMPLE_TYPE (InputLinux,INPUT_LINUX )
Signature · 1 line
2.26.2
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
3b4ff67 Use OBJECT_DECLARE_SIMPLE_TYPE when possible
eaa2981 Use OBJECT_DECLARE_TYPE when possible
03acc8c qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 6d27c01 qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE b685c0e scripts/codeconverter: Update to latest version
a2df5ab target/s390x: Set instance_align on S390CPU TypeInfo 594f05c target/riscv: Set instance_align on RISCVCPU TypeInfo 5a58e81 target/ppc: Set instance_align on PowerPCCPU TypeInfo e2a8ac0 target/arm: Set instance_align on CPUARM TypeInfo bcd4988 qom: Allow objects to be allocated with increased alignment b0b217e qom: Correct error values in two contracts
ebaf753 qom: Clean up object_property_get_enum()'s error value dc02a31 qom: Correct object_class_dynamic_cast_assert() documentation ef105b7 sifive: Use DECLARE_*CHECKER* macros
cc70b96 sifive: Move QOM typedefs and add missing includes de6f173 sifive_u: Rename memmap enum constants
bbcd058 sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit bbcd058ba88d (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit de6f1736ba22 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit cc70b96e145e (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit ef105b7dd404 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit dc02a319f106 (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit ebaf7539b573 (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit b0b217ebd071 (qom: Correct error values in two contracts) 8/17 Checking commit bcd4988bc4b7 (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit e2a8ac09abd6 (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit 5a58e818a231 (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 594f05cba2c3 (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit a2df5ab591ca (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit b685c0ebc878 (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit 6d27c01b0bf2 (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit 03acc8c3111e (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit eaa29811da80 (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit 3b4ff674f2e6 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
74e8c80 Use OBJECT_DECLARE_SIMPLE_TYPE when possible
15a16fe Use OBJECT_DECLARE_TYPE when possible
145c405 qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 580edfa qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE 7edd65a scripts/codeconverter: Update to latest version
668fa4d target/s390x: Set instance_align on S390CPU TypeInfo 200d65f target/riscv: Set instance_align on RISCVCPU TypeInfo 0dc3472 target/ppc: Set instance_align on PowerPCCPU TypeInfo 9b1a0bc target/arm: Set instance_align on CPUARM TypeInfo 121003c qom: Allow objects to be allocated with increased alignment 1967925 qom: Correct error values in two contracts
862522d qom: Clean up object_property_get_enum()'s error value 5363814 qom: Correct object_class_dynamic_cast_assert() documentation c3cbbe1 sifive: Use DECLARE_*CHECKER* macros
bb31b29 sifive: Move QOM typedefs and add missing includes 1bfe9f9 sifive_u: Rename memmap enum constants
20307d4 sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit 20307d4c2db9 (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit 1bfe9f9eccb5 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit bb31b295487b (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit c3cbbe15fbe1 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit 5363814b4203 (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit 862522d76ecb (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit 1967925fb215 (qom: Correct error values in two contracts) 8/17 Checking commit 121003cf6782 (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit 9b1a0bce035d (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit 0dc3472929b0 (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 200d65fb6653 (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit 668fa4dcfc21 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit 7edd65a82b36 (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit 580edfa51e34 (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit 145c40532e4a (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 15a16fe73496 (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit 74e8c804ff31 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
1bcfbb2 Use OBJECT_DECLARE_SIMPLE_TYPE when possible
08e6953 Use OBJECT_DECLARE_TYPE when possible
72fdac0 qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2781efa qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE d38f486 scripts/codeconverter: Update to latest version
33ac565 target/s390x: Set instance_align on S390CPU TypeInfo 15c02b0 target/riscv: Set instance_align on RISCVCPU TypeInfo 0697538 target/ppc: Set instance_align on PowerPCCPU TypeInfo 01e4115 target/arm: Set instance_align on CPUARM TypeInfo d841c00 qom: Allow objects to be allocated with increased alignment c0e47ab qom: Correct error values in two contracts
50ff473 qom: Clean up object_property_get_enum()'s error value 1ce9849 qom: Correct object_class_dynamic_cast_assert() documentation e0cbb86 sifive: Use DECLARE_*CHECKER* macros
fff0e9d sifive: Move QOM typedefs and add missing includes 0e43259 sifive_u: Rename memmap enum constants
6751174 sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit 675117461226 (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit 0e432596203a (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit fff0e9d3c704 (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit e0cbb861a0f1 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit 1ce98491fa0f (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit 50ff47330456 (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit c0e47ab69e94 (qom: Correct error values in two contracts) 8/17 Checking commit d841c007973f (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit 01e41158b462 (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit 069753871dfe (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 15c02b017584 (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit 33ac5652f3e9 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit d38f486f87c3 (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit 2781efaf60e3 (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit 72fdac039341 (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 08e69531e848 (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit 1bcfbb274512 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
de22210 Use OBJECT_DECLARE_SIMPLE_TYPE when possible
5cd8580 Use OBJECT_DECLARE_TYPE when possible
e9ae95c qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros e0fff31 qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE d0eee32 scripts/codeconverter: Update to latest version
7e2980a target/s390x: Set instance_align on S390CPU TypeInfo 2dd2736 target/riscv: Set instance_align on RISCVCPU TypeInfo fd958db target/ppc: Set instance_align on PowerPCCPU TypeInfo 6892afc target/arm: Set instance_align on CPUARM TypeInfo b03358a qom: Allow objects to be allocated with increased alignment 1696bbd qom: Correct error values in two contracts
7031979 qom: Clean up object_property_get_enum()'s error value a6e5eb1 qom: Correct object_class_dynamic_cast_assert() documentation 1b2ab9b sifive: Use DECLARE_*CHECKER* macros
ef0d4cc sifive: Move QOM typedefs and add missing includes b2ff8e5 sifive_u: Rename memmap enum constants
90e3b32 sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit 90e3b32b4fcf (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit b2ff8e5bae32 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit ef0d4cc9f1b2 (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit 1b2ab9bd6ac0 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit a6e5eb1839aa (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit 70319799f550 (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit 1696bbde14ec (qom: Correct error values in two contracts) 8/17 Checking commit b03358aba2ce (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit 6892afc331ae (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit fd958db2ab5c (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 2dd27361c009 (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit 7e2980a19686 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit d0eee32adefb (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit e0fff314b21b (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit e9ae95c7f51c (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 5cd8580b3fc2 (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit de22210a7ae9 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
1855acd Use OBJECT_DECLARE_SIMPLE_TYPE when possible
1ba9113 Use OBJECT_DECLARE_TYPE when possible
301b924 qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros b5ba236 qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE b30e1d1 scripts/codeconverter: Update to latest version
475d6df target/s390x: Set instance_align on S390CPU TypeInfo fa21af9 target/riscv: Set instance_align on RISCVCPU TypeInfo e51481b target/ppc: Set instance_align on PowerPCCPU TypeInfo 3511556 target/arm: Set instance_align on CPUARM TypeInfo 4597360 qom: Allow objects to be allocated with increased alignment ae0b669 qom: Correct error values in two contracts
0cdd391 qom: Clean up object_property_get_enum()'s error value 4516fcf qom: Correct object_class_dynamic_cast_assert() documentation f3e6e7e sifive: Use DECLARE_*CHECKER* macros
840bcce sifive: Move QOM typedefs and add missing includes ef8aea0 sifive_u: Rename memmap enum constants
bc295b9 sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit bc295b98441b (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit ef8aea032d91 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit 840bcce09a21 (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit f3e6e7e9b1a5 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit 4516fcf67041 (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit 0cdd39149527 (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit ae0b6696f49e (qom: Correct error values in two contracts) 8/17 Checking commit 459736081014 (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit 35115568c868 (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit e51481bca278 (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit fa21af9f7a84 (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit 475d6df70824 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit b30e1d1be0f8 (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit b5ba23667cc6 (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit 301b924e711a (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 1ba9113a0e10 (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit 1855acd29f01 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
6a1f315 Use OBJECT_DECLARE_SIMPLE_TYPE when possible
4afae17 Use OBJECT_DECLARE_TYPE when possible
1ba176a qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 0a6372b qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE c8e324b scripts/codeconverter: Update to latest version
1c5c320 target/s390x: Set instance_align on S390CPU TypeInfo 079efc9 target/riscv: Set instance_align on RISCVCPU TypeInfo 95506ca target/ppc: Set instance_align on PowerPCCPU TypeInfo 96327a7 target/arm: Set instance_align on CPUARM TypeInfo 4e58f8e qom: Allow objects to be allocated with increased alignment 9fa6ef3 qom: Correct error values in two contracts
b994450 qom: Clean up object_property_get_enum()'s error value 34235df qom: Correct object_class_dynamic_cast_assert() documentation 8be6b31 sifive: Use DECLARE_*CHECKER* macros
7898f8c sifive: Move QOM typedefs and add missing includes a9b2fb7 sifive_u: Rename memmap enum constants
3f9ce92 sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit 3f9ce92ef415 (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit a9b2fb7c9bd5 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit 7898f8c9bc92 (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit 8be6b316ddc2 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit 34235df79ff1 (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit b9944503317e (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit 9fa6ef3b7a23 (qom: Correct error values in two contracts) 8/17 Checking commit 4e58f8efc4d9 (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit 96327a752391 (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit 95506caba7ae (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 079efc944e45 (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit 1c5c320d8b17 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit c8e324bb5e90 (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit 0a6372b3ca97 (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit 1ba176a84a10 (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 4afae17cd70e (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit 6a1f31528263 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
f6c74dd Use OBJECT_DECLARE_SIMPLE_TYPE when possible
8272134 Use OBJECT_DECLARE_TYPE when possible
5185bc1 qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 43d39ef qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE dd1224a scripts/codeconverter: Update to latest version
f874a90 target/s390x: Set instance_align on S390CPU TypeInfo 28a1f3a target/riscv: Set instance_align on RISCVCPU TypeInfo 2bea693 target/ppc: Set instance_align on PowerPCCPU TypeInfo 21154be target/arm: Set instance_align on CPUARM TypeInfo a7c4b0a qom: Allow objects to be allocated with increased alignment 8f20dae qom: Correct error values in two contracts
e12e839 qom: Clean up object_property_get_enum()'s error value c57d948 qom: Correct object_class_dynamic_cast_assert() documentation ceb22c8 sifive: Use DECLARE_*CHECKER* macros
4f27d5d sifive: Move QOM typedefs and add missing includes 5bafd89 sifive_u: Rename memmap enum constants
87c152d sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit 87c152dcf03d (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit 5bafd89b66d5 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit 4f27d5da8e4b (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit ceb22c81179f (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit c57d9480b4b6 (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit e12e839c4ad7 (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit 8f20daefe95f (qom: Correct error values in two contracts) 8/17 Checking commit a7c4b0a56a69 (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit 21154bec67a2 (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit 2bea6934f453 (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 28a1f3afc08d (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit f874a90dd3a9 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit dd1224ac349f (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit 43d39efe7f8b (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit 5185bc16076a (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 827213434dea (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit f6c74ddf0414 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
76fd418 Use OBJECT_DECLARE_SIMPLE_TYPE when possible
9c82f12 Use OBJECT_DECLARE_TYPE when possible
a7bf367 qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 85ab819 qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE 46a0c5d scripts/codeconverter: Update to latest version
c35a467 target/s390x: Set instance_align on S390CPU TypeInfo 67ee71c target/riscv: Set instance_align on RISCVCPU TypeInfo c6b9c7a target/ppc: Set instance_align on PowerPCCPU TypeInfo e83419e target/arm: Set instance_align on CPUARM TypeInfo dabf1db qom: Allow objects to be allocated with increased alignment 9bc8d41 qom: Correct error values in two contracts
af37491 qom: Clean up object_property_get_enum()'s error value 4d928e3 qom: Correct object_class_dynamic_cast_assert() documentation ef1fca5 sifive: Use DECLARE_*CHECKER* macros
dd8e67f sifive: Move QOM typedefs and add missing includes 542cd36 sifive_u: Rename memmap enum constants
a07fdaf sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit a07fdaf48ece (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit 542cd36db1b7 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit dd8e67f840f5 (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit ef1fca5ea9b8 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit 4d928e3c7f55 (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit af37491b5183 (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit 9bc8d41d1a5b (qom: Correct error values in two contracts) 8/17 Checking commit dabf1db9bdca (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit e83419eb6288 (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit c6b9c7a5d5a4 (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 67ee71cd9bad (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit c35a4672d7e2 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit 46a0c5dd79f5 (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit 85ab81939e08 (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit a7bf367e930b (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 9c82f121a0ac (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit 76fd418b97d9 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Patchew URL: https://patchew.org/QEMU/[email protected]/
Patchew URL: https://patchew.org/QEMU/[email protected]/
Hi,
This series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [PULL 00/17] QOM queue, 2020-09-18
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
From https://github.com/patchew-project/qemu
- [tag update] patchew/[email protected] -> patchew/[email protected]
Switched to a new branch 'test'
5a6b1fa Use OBJECT_DECLARE_SIMPLE_TYPE when possible
95d0783 Use OBJECT_DECLARE_TYPE when possible
41b1cb3 qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 6932dc5 qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE c3489dd scripts/codeconverter: Update to latest version
61f085d target/s390x: Set instance_align on S390CPU TypeInfo 2e70966 target/riscv: Set instance_align on RISCVCPU TypeInfo 8d4eca4 target/ppc: Set instance_align on PowerPCCPU TypeInfo c3adeb2 target/arm: Set instance_align on CPUARM TypeInfo c9b2e9e qom: Allow objects to be allocated with increased alignment f442e8d qom: Correct error values in two contracts
9bae3de qom: Clean up object_property_get_enum()'s error value d29bde2 qom: Correct object_class_dynamic_cast_assert() documentation 726e21f sifive: Use DECLARE_*CHECKER* macros
ebefe81 sifive: Move QOM typedefs and add missing includes f195ea7 sifive_u: Rename memmap enum constants
34677c0 sifive_e: Rename memmap enum constants
=== OUTPUT BEGIN ===
1/17 Checking commit 34677c0f237d (sifive_e: Rename memmap enum constants)
WARNING: line over 80 characters
#86: FILE: hw/riscv/sifive_e.c:114:
+ memmap[SIFIVE_E_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#131: FILE: hw/riscv/sifive_e.c:229:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_E_DEV_GPIO0].base);
total: 0 errors, 2 warnings, 186 lines checked
Patch 1/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
2/17 Checking commit f195ea7e9d40 (sifive_u: Rename memmap enum constants)
WARNING: line over 80 characters
#303: FILE: hw/riscv/sifive_u.c:531:
+ memmap[SIFIVE_U_DEV_MROM].base, &address_space_memory);
WARNING: line over 80 characters
#367: FILE: hw/riscv/sifive_u.c:734:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->prci), 0, memmap[SIFIVE_U_DEV_PRCI].base);
WARNING: line over 80 characters
#374: FILE: hw/riscv/sifive_u.c:740:
+ sysbus_mmio_map(SYS_BUS_DEVICE(&s->gpio), 0, memmap[SIFIVE_U_DEV_GPIO].base);
total: 0 errors, 3 warnings, 412 lines checked
Patch 2/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
3/17 Checking commit ebefe8167326 (sifive: Move QOM typedefs and add missing includes) 4/17 Checking commit 726e21fa44a9 (sifive: Use DECLARE_*CHECKER* macros)
5/17 Checking commit d29bde217a9c (qom: Correct object_class_dynamic_cast_assert() documentation) 6/17 Checking commit 9bae3de62647 (qom: Clean up object_property_get_enum()'s error value) 7/17 Checking commit f442e8da2ff1 (qom: Correct error values in two contracts) 8/17 Checking commit c9b2e9ede568 (qom: Allow objects to be allocated with increased alignment)
WARNING: architecture specific defines should be avoided
#74: FILE: qom/object.c:694:
+#if __STDC_VERSION__ >= 201112L
total: 0 errors, 1 warnings, 84 lines checked
Patch 8/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
9/17 Checking commit c3adeb2f9398 (target/arm: Set instance_align on CPUARM TypeInfo)
10/17 Checking commit 8d4eca4f2078 (target/ppc: Set instance_align on PowerPCCPU TypeInfo)
11/17 Checking commit 2e70966b71cf (target/riscv: Set instance_align on RISCVCPU TypeInfo)
12/17 Checking commit 61f085dbe812 (target/s390x: Set instance_align on S390CPU TypeInfo)
13/17 Checking commit c3489ddd9af9 (scripts/codeconverter: Update to latest version)
ERROR: line over 90 characters
#26: FILE: scripts/codeconverter/codeconverter/patching.py:8:
+from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
ERROR: line over 90 characters
#78: FILE: scripts/codeconverter/codeconverter/patching.py:184:
+ def group_finditer(self, klass: Type['FileMatch'], group: Union[str, int]) -> Iterable['FileMatch']:
ERROR: line over 90 characters
#85: FILE: scripts/codeconverter/codeconverter/patching.py:191:
+ def try_group_match(self, klass: Type['FileMatch'], group: Union[str, int]) -> Optional['FileMatch']:
WARNING: line over 80 characters
#161: FILE: scripts/codeconverter/codeconverter/patching.py:289:
+ def find_match(self, t: Type[T], name: str, group: str='name') -> Optional[T]:
WARNING: line over 80 characters
#194: FILE: scripts/codeconverter/codeconverter/patching.py:331:
+ matches = [klass(self, m) for m in klass.finditer(self.original_content)]
ERROR: line over 90 characters
#221: FILE: scripts/codeconverter/codeconverter/patching.py:370:
+ def scan_for_matches(self, class_names: Optional[List[str]]=None) -> Iterable[FileMatch]:
WARNING: line over 80 characters
#337: FILE: scripts/codeconverter/codeconverter/qom_macros.py:28:
+ regexp = S(r'^[ \t]*#[ \t]*define', CPP_SPACE, NAMED('name', RE_IDENTIFIER), r'\b')
ERROR: line over 90 characters
#394: FILE: scripts/codeconverter/codeconverter/qom_macros.py:444:
+ r'\s*\(\s*', OR(NAMED('instancetype', RE_IDENTIFIER), RE_TYPE, name='c_type'),
ERROR: line over 90 characters
#457: FILE: scripts/codeconverter/codeconverter/qom_macros.py:513:
+ OR(RE_IDENTIFIER, RE_STRING, RE_MACRO_CONCAT, RE_FUN_CALL, name='typename'), SP,
WARNING: line over 80 characters
#521: FILE: scripts/codeconverter/codeconverter/qom_macros.py:575:
+ """Common base class for code that will look at a set of type declarations"""
ERROR: line over 90 characters
#531: FILE: scripts/codeconverter/codeconverter/qom_macros.py:583:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareInstanceChecker, DeclareInstanceType,
WARNING: line over 80 characters
#532: FILE: scripts/codeconverter/codeconverter/qom_macros.py:584:
+ DeclareClassCheckers, DeclareClassType,
WARNING: line over 80 characters
#550: FILE: scripts/codeconverter/codeconverter/qom_macros.py:602:
+ field_dict = dict((f, v.pop() if v else None) for f,v in fvalues.items())
WARNING: line over 80 characters
#551: FILE: scripts/codeconverter/codeconverter/qom_macros.py:603:
+ yield from self.gen_patches_for_type(uppercase, checkers, field_dict)
WARNING: line over 80 characters
#553: FILE: scripts/codeconverter/codeconverter/qom_macros.py:605:
+ def find_conflicts(self, uppercase: str, checkers: List[TypeDeclaration]) -> bool:
WARNING: line over 80 characters
#554: FILE: scripts/codeconverter/codeconverter/qom_macros.py:606:
+ """Look for conflicting declarations that would make it unsafe to add new ones"""
WARNING: line over 80 characters
#557: FILE: scripts/codeconverter/codeconverter/qom_macros.py:609:
+ conflicting.extend(chain(self.file.find_matches(DefineDirective, uppercase),
ERROR: line over 90 characters
#558: FILE: scripts/codeconverter/codeconverter/qom_macros.py:610:
+ self.file.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#559: FILE: scripts/codeconverter/codeconverter/qom_macros.py:611:
+ self.file.find_matches(DeclareClassType, uppercase, 'uppercase'),
ERROR: line over 90 characters
#560: FILE: scripts/codeconverter/codeconverter/qom_macros.py:612:
+ self.file.find_matches(DeclareInstanceType, uppercase, 'uppercase')))
ERROR: line over 90 characters
#563: FILE: scripts/codeconverter/codeconverter/qom_macros.py:615:
+ conflicting.extend(o for o in chain(self.allfiles.find_matches(DeclareInstanceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#564: FILE: scripts/codeconverter/codeconverter/qom_macros.py:616:
+ self.allfiles.find_matches(DeclareClassCheckers, uppercase, 'uppercase'),
ERROR: line over 90 characters
#565: FILE: scripts/codeconverter/codeconverter/qom_macros.py:617:
+ self.allfiles.find_matches(DeclareInterfaceChecker, uppercase, 'uppercase'),
ERROR: line over 90 characters
#566: FILE: scripts/codeconverter/codeconverter/qom_macros.py:618:
+ self.allfiles.find_matches(DefineDirective, uppercase))
WARNING: line over 80 characters
#568: FILE: scripts/codeconverter/codeconverter/qom_macros.py:620:
+ # if both are .c files, there's no conflict at all:
WARNING: line over 80 characters
#585: FILE: scripts/codeconverter/codeconverter/qom_macros.py:637:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#595: FILE: scripts/codeconverter/codeconverter/qom_macros.py:647:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#625: FILE: scripts/codeconverter/codeconverter/qom_macros.py:655:
+ yield first_checker.prepend(f'DECLARE_INSTANCE_TYPE({uppercase}, void)\n')
WARNING: line over 80 characters
#627: FILE: scripts/codeconverter/codeconverter/qom_macros.py:657:
+ yield first_checker.prepend(f'DECLARE_CLASS_TYPE({uppercase}, void)\n')
ERROR: line over 90 characters
#634: FILE: scripts/codeconverter/codeconverter/qom_macros.py:664:
+ #s = (f"DECLARE_OBJ_CHECKERS({final_values['instancetype']}, {final_values['classtype']},\n"+
ERROR: line over 90 characters
#635: FILE: scripts/codeconverter/codeconverter/qom_macros.py:665:
+ # f" {final_values['uppercase']}, {final_values['typename']})\n")
WARNING: line over 80 characters
#645: FILE: scripts/codeconverter/codeconverter/qom_macros.py:675:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
ERROR: line over 90 characters
#719: FILE: scripts/codeconverter/codeconverter/qom_macros.py:754:
+def find_type_checkers(files:FileList, name:str, group:str='uppercase') -> Iterable[TypeCheckerDeclaration]:
ERROR: line over 90 characters
#722: FILE: scripts/codeconverter/codeconverter/qom_macros.py:757:
+ for c in (DeclareInstanceChecker, DeclareClassCheckers, DeclareObjCheckers, ObjectDeclareType, ObjectDeclareSimpleType):
ERROR: line over 90 characters
#738: FILE: scripts/codeconverter/codeconverter/qom_macros.py:794:
+ user_classes = [TypeCheckMacro, DeclareObjCheckers, DeclareInstanceChecker, DeclareClassCheckers, InterfaceCheckMacro]
ERROR: line over 90 characters
#796: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:43:
+ return [m.group('arrayitem') for m in self.group_finditer(ArrayItem, 'arrayitems')]
WARNING: line over 80 characters
#820: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:66:
+ Common base class for type definitions (TypeInfo variables or OBJECT_DEFINE* macros)
WARNING: line over 80 characters
#987: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:245:
+ self.warn("%s class size type (%s) is not *Class?", self.name, classtype)
ERROR: line over 90 characters
#992: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:250:
+ self.debug("searching for simpletype declaration using %s as InstanceType", instancetype)
ERROR: line over 90 characters
#1005: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:263:
+ c = (f'OBJECT_DECLARE_SIMPLE_TYPE({self.group("instancetype")}, {self.group("lowercase")},\n'
WARNING: line over 80 characters
#1012: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:270:
+ # this will just ensure the caches for find_match() and matches_for_type()
ERROR: line over 90 characters
#1047: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:321:
+ # self.warn("macro/constant type name is required for instance/class type")
WARNING: line over 80 characters
#1066: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:333:
+ self.warn("This will make type validation difficult in the future")
WARNING: line over 80 characters
#1069: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:336:
+ parent_uppercase = find_typename_uppercase(self.allfiles, parent_typename)
ERROR: line over 90 characters
#1071: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:338:
+ self.info("Can't find right uppercase name for parent type (%s)", parent_typename)
ERROR: line over 90 characters
#1073: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:340:
+ self.warn("Can't find right uppercase name for parent type (%s)", parent_typename)
WARNING: line over 80 characters
#1074: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:341:
+ self.warn("This will make type validation difficult in the future")
ERROR: line over 90 characters
#1096: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:346:
+ #checkers: List[TypeCheckerDeclaration] = list(find_type_checkers(self.allfiles, uppercase))
ERROR: line over 90 characters
#1098: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:348:
+ # c.info("instance type checker declaration (%s) is here", c.group('uppercase'))
ERROR: line over 90 characters
#1102: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:352:
+ # self.warn("Can't find where type checkers for %s (%s) are declared. We will need them to validate sizes of %s",
ERROR: line over 90 characters
#1123: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:371:
+ # self.warn("type at instance_size is %r. Should instance_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1128: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:376:
+ # self.warn("instance type checker for %s (%s) not found", typename, instancetype)
ERROR: line over 90 characters
#1142: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:390:
+ # self.warn("type at class_size is %r. Should class_size be set to sizeof(%s) ?",
ERROR: line over 90 characters
#1147: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:395:
+ # self.warn("class type checker for %s (%s) not found", typename, classtype)
WARNING: line over 80 characters
#1170: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:416:
+ newbegin += f' {instancetype}, {classtype},\n'
WARNING: line over 80 characters
#1171: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:417:
+ newbegin += f' {uppercase}, {parent_uppercase}'
WARNING: line over 80 characters
#1204: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:450:
+def find_type_definitions(files: FileList, uppercase: str) -> Iterable[TypeDefinition]:
ERROR: line over 90 characters
#1205: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:451:
+ types: List[Type[TypeDefinition]] = [TypeInfoVar, ObjectDefineType, ObjectDefineTypeExtended]
WARNING: line over 80 characters
#1217: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:463:
+ fields: Dict[str, Optional[str]]) -> Iterable[Patch]:
WARNING: line over 80 characters
#1265: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:511:
+ instance_checkers = [c for c in find_type_checkers(self.allfiles, uppercase)
WARNING: line over 80 characters
#1297: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:543:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1302: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:548:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1311: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:557:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1313: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:559:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1329: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:575:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
WARNING: line over 80 characters
#1334: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:580:
+ self.warn("mismatching class type for %s (%s)", uppercase, classtype)
ERROR: line over 90 characters
#1351: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:597:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1377: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:623:
+ self.warn("typedef mismatch: %s is defined as %s", t, td_type)
ERROR: line over 90 characters
#1382: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:628:
+ other_instance_checkers = [c for c in find_type_checkers(self.allfiles, instancetype, 'instancetype')
ERROR: line over 90 characters
#1391: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:637:
+ decl_types: List[Type[TypeDeclaration]] = [DeclareClassCheckers, DeclareObjCheckers]
WARNING: line over 80 characters
#1393: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:639:
+ for m in self.allfiles.find_matches(t, uppercase, 'uppercase')]
ERROR: line over 90 characters
#1414: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:660:
+ self.warn("mismatching instance type for %s (%s)", uppercase, instancetype)
ERROR: line over 90 characters
#1436: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:682:
+ elif not re.search(r'\b'+t+r'\b', self.file.original_content[td.end():self.start()]):
WARNING: line over 80 characters
#1457: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:703:
+ #all_defines = [m for m in self.allfiles.matches_of_type(ExpressionDefine)]
ERROR: line over 90 characters
#1487: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:744:
+ if 'instance_size' in values and parent.get_raw_initializer_value('instance_size') != values['instance_size'].raw:
ERROR: line over 90 characters
#1493: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:749:
+ if 'class_size' in values and parent.get_raw_initializer_value('class_size') != values['class_size'].raw:
ERROR: line over 90 characters
#1564: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:871:
+ self.warn("can't identify the function where type_register_static(&%s) is called", self.name)
WARNING: line over 80 characters
#1613: FILE: scripts/codeconverter/codeconverter/qom_type_info.py:912:
+ yield self.group_match('func_name').make_patch('type_register_static')
total: 44 errors, 34 warnings, 1701 lines checked
Patch 13/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
14/17 Checking commit 6932dc5c6f5b (qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE)
WARNING: line over 80 characters
#228: FILE: include/qom/object.h:649:
+#define OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, module_obj_name, MODULE_OBJ_NAME) \
WARNING: line over 80 characters
#233: FILE: include/qom/object.h:654:
+ DECLARE_INSTANCE_CHECKER(InstanceType, MODULE_OBJ_NAME, TYPE_##MODULE_OBJ_NAME)
total: 0 errors, 2 warnings, 192 lines checked
Patch 14/17 has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
15/17 Checking commit 41b1cb33f3c8 (qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros) 16/17 Checking commit 95d078312670 (Use OBJECT_DECLARE_TYPE when possible)
WARNING: line over 80 characters
#153: FILE: hw/arm/vexpress.c:184:
+OBJECT_DECLARE_TYPE(VexpressMachineState, VexpressMachineClass, VEXPRESS_MACHINE)
WARNING: line over 80 characters
#970: FILE: include/hw/s390x/3270-ccw.h:34:
+OBJECT_DECLARE_TYPE(EmulatedCcw3270Device, EmulatedCcw3270Class, EMULATED_CCW_3270)
total: 0 errors, 2 warnings, 902 lines checked
Patch 16/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
17/17 Checking commit 5a6b1fad40e9 (Use OBJECT_DECLARE_SIMPLE_TYPE when possible)
WARNING: line over 80 characters
#46: FILE: backends/cryptodev-vhost-user.c:42:
+OBJECT_DECLARE_SIMPLE_TYPE(CryptoDevBackendVhostUser, CRYPTODEV_BACKEND_VHOST_USER)
total: 0 errors, 1 warnings, 6146 lines checked
Patch 17/17 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]
Peter Maydell
AppliedQuoted 21 lines · Eduardo Habkost
The following changes since commit
053a4177817db307ec854356e95b5b350800a216:Merge remote-tracking branch 'remotes/philmd-gitlab/tags/fw_cfg-20200918' into staging (2020-09-18 16:34:26 +0100)
are available in the Git repository at:
git://github.com/ehabkost/qemu.gittags/machine-next-pull-requestfor you to fetch changes up to
8063396bf3459a810d24e3efd6110b8480f0de5b:Use
OBJECT_DECLARE_SIMPLE_TYPEwhen possible (2020-09-18 14:12:32 -0400)----------------------------------------------------------------
QOM queue, 2020-09-18Fixes:
* Error value corrections (Markus Armbruster)
* Correctobject_class_dynamic_cast_assert()documentation (Eduardo Habkost)
* Ensure objects usingQEMU_ALIGNEDare properly aligned (Richard Henderson)
Quoted 7 lines
QOM cleanups (Eduardo Habkost):
* Rename some constants
* Simplify parameters of OBJECT_DECLARE* macros
* Additional DECLARE_*CHECKER* usage
* AdditionalOBJECT_DECLARE_TYPEusage
* AdditionalOBJECT_DECLARE_SIMPLE_TYPEusage
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.
-- PMM