diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-31 17:07:37 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-09 09:27:11 -0400 |
commit | c821774a3b7ca991d684c3966171d8657f842aea (patch) | |
tree | 57b444ef9ee2ac18c63795d00644776ac4b8cc43 /target | |
parent | fa34a3c58ae7161463aded42e70bd59c212ed9f4 (diff) |
Use OBJECT_DECLARE_TYPE where possible
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the
typedefs can be safely removed.
Generated running:
$ ./scripts/codeconverter/converter.py -i \
--pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]')
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200831210740.126168-16-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-17-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-18-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/alpha/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/arm/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/avr/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/cris/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/hppa/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/i386/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/lm32/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/m68k/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/microblaze/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/mips/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/moxie/cpu.h | 6 | ||||
-rw-r--r-- | target/nios2/cpu.h | 6 | ||||
-rw-r--r-- | target/openrisc/cpu.h | 6 | ||||
-rw-r--r-- | target/ppc/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/riscv/cpu.h | 6 | ||||
-rw-r--r-- | target/rx/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/s390x/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/sh4/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/sparc/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/tilegx/cpu.h | 6 | ||||
-rw-r--r-- | target/tricore/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/unicore32/cpu-qom.h | 6 | ||||
-rw-r--r-- | target/xtensa/cpu-qom.h | 6 |
23 files changed, 46 insertions, 92 deletions
diff --git a/target/alpha/cpu-qom.h b/target/alpha/cpu-qom.h index 45350318c9..568fe3fb77 100644 --- a/target/alpha/cpu-qom.h +++ b/target/alpha/cpu-qom.h @@ -25,10 +25,8 @@ #define TYPE_ALPHA_CPU "alpha-cpu" -typedef struct AlphaCPU AlphaCPU; -typedef struct AlphaCPUClass AlphaCPUClass; -DECLARE_OBJ_CHECKERS(AlphaCPU, AlphaCPUClass, - ALPHA_CPU, TYPE_ALPHA_CPU) +OBJECT_DECLARE_TYPE(AlphaCPU, AlphaCPUClass, + alpha_cpu, ALPHA_CPU) /** * AlphaCPUClass: diff --git a/target/arm/cpu-qom.h b/target/arm/cpu-qom.h index 92d58f84fe..94bbbd4473 100644 --- a/target/arm/cpu-qom.h +++ b/target/arm/cpu-qom.h @@ -27,10 +27,8 @@ struct arm_boot_info; #define TYPE_ARM_CPU "arm-cpu" -typedef struct ARMCPU ARMCPU; -typedef struct ARMCPUClass ARMCPUClass; -DECLARE_OBJ_CHECKERS(ARMCPU, ARMCPUClass, - ARM_CPU, TYPE_ARM_CPU) +OBJECT_DECLARE_TYPE(ARMCPU, ARMCPUClass, + arm_cpu, ARM_CPU) #define TYPE_ARM_MAX_CPU "max-" TYPE_ARM_CPU diff --git a/target/avr/cpu-qom.h b/target/avr/cpu-qom.h index 1bbfbb2087..49d63faad2 100644 --- a/target/avr/cpu-qom.h +++ b/target/avr/cpu-qom.h @@ -26,10 +26,8 @@ #define TYPE_AVR_CPU "avr-cpu" -typedef struct AVRCPU AVRCPU; -typedef struct AVRCPUClass AVRCPUClass; -DECLARE_OBJ_CHECKERS(AVRCPU, AVRCPUClass, - AVR_CPU, TYPE_AVR_CPU) +OBJECT_DECLARE_TYPE(AVRCPU, AVRCPUClass, + avr_cpu, AVR_CPU) /** * AVRCPUClass: diff --git a/target/cris/cpu-qom.h b/target/cris/cpu-qom.h index eced6ef7c9..2b0328113c 100644 --- a/target/cris/cpu-qom.h +++ b/target/cris/cpu-qom.h @@ -25,10 +25,8 @@ #define TYPE_CRIS_CPU "cris-cpu" -typedef struct CRISCPU CRISCPU; -typedef struct CRISCPUClass CRISCPUClass; -DECLARE_OBJ_CHECKERS(CRISCPU, CRISCPUClass, - CRIS_CPU, TYPE_CRIS_CPU) +OBJECT_DECLARE_TYPE(CRISCPU, CRISCPUClass, + cris_cpu, CRIS_CPU) /** * CRISCPUClass: diff --git a/target/hppa/cpu-qom.h b/target/hppa/cpu-qom.h index 5c5aa0c053..58158f374b 100644 --- a/target/hppa/cpu-qom.h +++ b/target/hppa/cpu-qom.h @@ -25,10 +25,8 @@ #define TYPE_HPPA_CPU "hppa-cpu" -typedef struct HPPACPU HPPACPU; -typedef struct HPPACPUClass HPPACPUClass; -DECLARE_OBJ_CHECKERS(HPPACPU, HPPACPUClass, - HPPA_CPU, TYPE_HPPA_CPU) +OBJECT_DECLARE_TYPE(HPPACPU, HPPACPUClass, + hppa_cpu, HPPA_CPU) /** * HPPACPUClass: diff --git a/target/i386/cpu-qom.h b/target/i386/cpu-qom.h index 05b52ba74c..0505472e86 100644 --- a/target/i386/cpu-qom.h +++ b/target/i386/cpu-qom.h @@ -30,10 +30,8 @@ #define TYPE_X86_CPU "i386-cpu" #endif -typedef struct X86CPU X86CPU; -typedef struct X86CPUClass X86CPUClass; -DECLARE_OBJ_CHECKERS(X86CPU, X86CPUClass, - X86_CPU, TYPE_X86_CPU) +OBJECT_DECLARE_TYPE(X86CPU, X86CPUClass, + x86_cpu, X86_CPU) typedef struct X86CPUModel X86CPUModel; diff --git a/target/lm32/cpu-qom.h b/target/lm32/cpu-qom.h index 9bf2f82ffe..e9eb495bf0 100644 --- a/target/lm32/cpu-qom.h +++ b/target/lm32/cpu-qom.h @@ -25,10 +25,8 @@ #define TYPE_LM32_CPU "lm32-cpu" -typedef struct LM32CPU LM32CPU; -typedef struct LM32CPUClass LM32CPUClass; -DECLARE_OBJ_CHECKERS(LM32CPU, LM32CPUClass, - LM32_CPU, TYPE_LM32_CPU) +OBJECT_DECLARE_TYPE(LM32CPU, LM32CPUClass, + lm32_cpu, LM32_CPU) /** * LM32CPUClass: diff --git a/target/m68k/cpu-qom.h b/target/m68k/cpu-qom.h index 241a3b19af..a10429cf67 100644 --- a/target/m68k/cpu-qom.h +++ b/target/m68k/cpu-qom.h @@ -25,10 +25,8 @@ #define TYPE_M68K_CPU "m68k-cpu" -typedef struct M68kCPU M68kCPU; -typedef struct M68kCPUClass M68kCPUClass; -DECLARE_OBJ_CHECKERS(M68kCPU, M68kCPUClass, - M68K_CPU, TYPE_M68K_CPU) +OBJECT_DECLARE_TYPE(M68kCPU, M68kCPUClass, + m68k_cpu, M68K_CPU) /* * M68kCPUClass: diff --git a/target/microblaze/cpu-qom.h b/target/microblaze/cpu-qom.h index 73c2237f98..82734b9b2b 100644 --- a/target/microblaze/cpu-qom.h +++ b/target/microblaze/cpu-qom.h @@ -25,10 +25,8 @@ #define TYPE_MICROBLAZE_CPU "microblaze-cpu" -typedef struct MicroBlazeCPU MicroBlazeCPU; -typedef struct MicroBlazeCPUClass MicroBlazeCPUClass; -DECLARE_OBJ_CHECKERS(MicroBlazeCPU, MicroBlazeCPUClass, - MICROBLAZE_CPU, TYPE_MICROBLAZE_CPU) +OBJECT_DECLARE_TYPE(MicroBlazeCPU, MicroBlazeCPUClass, + microblaze_cpu, MICROBLAZE_CPU) /** * MicroBlazeCPUClass: diff --git a/target/mips/cpu-qom.h b/target/mips/cpu-qom.h index 82f45a828c..93fbbdca1b 100644 --- a/target/mips/cpu-qom.h +++ b/target/mips/cpu-qom.h @@ -29,10 +29,8 @@ #define TYPE_MIPS_CPU "mips-cpu" #endif -typedef struct MIPSCPU MIPSCPU; -typedef struct MIPSCPUClass MIPSCPUClass; -DECLARE_OBJ_CHECKERS(MIPSCPU, MIPSCPUClass, - MIPS_CPU, TYPE_MIPS_CPU) +OBJECT_DECLARE_TYPE(MIPSCPU, MIPSCPUClass, + mips_cpu, MIPS_CPU) /** * MIPSCPUClass: diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index a9832a2d85..d58761ccb1 100644 --- a/target/moxie/cpu.h +++ b/target/moxie/cpu.h @@ -51,10 +51,8 @@ typedef struct CPUMoxieState { #define TYPE_MOXIE_CPU "moxie-cpu" -typedef struct MoxieCPU MoxieCPU; -typedef struct MoxieCPUClass MoxieCPUClass; -DECLARE_OBJ_CHECKERS(MoxieCPU, MoxieCPUClass, - MOXIE_CPU, TYPE_MOXIE_CPU) +OBJECT_DECLARE_TYPE(MoxieCPU, MoxieCPUClass, + moxie_cpu, MOXIE_CPU) /** * MoxieCPUClass: diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 0b91a3634b..1fa0fdaa35 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -32,10 +32,8 @@ typedef struct CPUNios2State CPUNios2State; #define TYPE_NIOS2_CPU "nios2-cpu" -typedef struct Nios2CPU Nios2CPU; -typedef struct Nios2CPUClass Nios2CPUClass; -DECLARE_OBJ_CHECKERS(Nios2CPU, Nios2CPUClass, - NIOS2_CPU, TYPE_NIOS2_CPU) +OBJECT_DECLARE_TYPE(Nios2CPU, Nios2CPUClass, + nios2_cpu, NIOS2_CPU) /** * Nios2CPUClass: diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index 5e6d8a40d6..d0a8ee657a 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -29,10 +29,8 @@ struct OpenRISCCPU; #define TYPE_OPENRISC_CPU "or1k-cpu" -typedef struct OpenRISCCPU OpenRISCCPU; -typedef struct OpenRISCCPUClass OpenRISCCPUClass; -DECLARE_OBJ_CHECKERS(OpenRISCCPU, OpenRISCCPUClass, - OPENRISC_CPU, TYPE_OPENRISC_CPU) +OBJECT_DECLARE_TYPE(OpenRISCCPU, OpenRISCCPUClass, + openrisc_cpu, OPENRISC_CPU) /** * OpenRISCCPUClass: diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index f7e600c7b3..5cf806a3a6 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -29,10 +29,8 @@ #define TYPE_POWERPC_CPU "powerpc-cpu" #endif -typedef struct PowerPCCPU PowerPCCPU; -typedef struct PowerPCCPUClass PowerPCCPUClass; -DECLARE_OBJ_CHECKERS(PowerPCCPU, PowerPCCPUClass, - POWERPC_CPU, TYPE_POWERPC_CPU) +OBJECT_DECLARE_TYPE(PowerPCCPU, PowerPCCPUClass, + powerpc_cpu, POWERPC_CPU) typedef struct CPUPPCState CPUPPCState; typedef struct ppc_tb_t ppc_tb_t; diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 04ccb78738..ca75fc761e 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -232,10 +232,8 @@ struct CPURISCVState { QEMUTimer *timer; /* Internal timer */ }; -typedef struct RISCVCPU RISCVCPU; -typedef struct RISCVCPUClass RISCVCPUClass; -DECLARE_OBJ_CHECKERS(RISCVCPU, RISCVCPUClass, - RISCV_CPU, TYPE_RISCV_CPU) +OBJECT_DECLARE_TYPE(RISCVCPU, RISCVCPUClass, + riscv_cpu, RISCV_CPU) /** * RISCVCPUClass: diff --git a/target/rx/cpu-qom.h b/target/rx/cpu-qom.h index 05f5773ab1..6c5321078d 100644 --- a/target/rx/cpu-qom.h +++ b/target/rx/cpu-qom.h @@ -26,10 +26,8 @@ #define TYPE_RX62N_CPU RX_CPU_TYPE_NAME("rx62n") -typedef struct RXCPU RXCPU; -typedef struct RXCPUClass RXCPUClass; -DECLARE_OBJ_CHECKERS(RXCPU, RXCPUClass, - RX_CPU, TYPE_RX_CPU) +OBJECT_DECLARE_TYPE(RXCPU, RXCPUClass, + rx_cpu, RX_CPU) /* * RXCPUClass: diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h index 5f0dccdac1..e2b2513711 100644 --- a/target/s390x/cpu-qom.h +++ b/target/s390x/cpu-qom.h @@ -25,10 +25,8 @@ #define TYPE_S390_CPU "s390x-cpu" -typedef struct S390CPU S390CPU; -typedef struct S390CPUClass S390CPUClass; -DECLARE_OBJ_CHECKERS(S390CPU, S390CPUClass, - S390_CPU, TYPE_S390_CPU) +OBJECT_DECLARE_TYPE(S390CPU, S390CPUClass, + s390_cpu, S390_CPU) typedef struct S390CPUModel S390CPUModel; typedef struct S390CPUDef S390CPUDef; diff --git a/target/sh4/cpu-qom.h b/target/sh4/cpu-qom.h index b04b2bb4bf..595814b8cb 100644 --- a/target/sh4/cpu-qom.h +++ b/target/sh4/cpu-qom.h @@ -29,10 +29,8 @@ #define TYPE_SH7751R_CPU SUPERH_CPU_TYPE_NAME("sh7751r") #define TYPE_SH7785_CPU SUPERH_CPU_TYPE_NAME("sh7785") -typedef struct SuperHCPU SuperHCPU; -typedef struct SuperHCPUClass SuperHCPUClass; -DECLARE_OBJ_CHECKERS(SuperHCPU, SuperHCPUClass, - SUPERH_CPU, TYPE_SUPERH_CPU) +OBJECT_DECLARE_TYPE(SuperHCPU, SuperHCPUClass, + superh_cpu, SUPERH_CPU) /** * SuperHCPUClass: diff --git a/target/sparc/cpu-qom.h b/target/sparc/cpu-qom.h index 42cb631d45..5d7fb727bc 100644 --- a/target/sparc/cpu-qom.h +++ b/target/sparc/cpu-qom.h @@ -29,10 +29,8 @@ #define TYPE_SPARC_CPU "sparc-cpu" #endif -typedef struct SPARCCPU SPARCCPU; -typedef struct SPARCCPUClass SPARCCPUClass; -DECLARE_OBJ_CHECKERS(SPARCCPU, SPARCCPUClass, - SPARC_CPU, TYPE_SPARC_CPU) +OBJECT_DECLARE_TYPE(SPARCCPU, SPARCCPUClass, + sparc_cpu, SPARC_CPU) typedef struct sparc_def_t sparc_def_t; /** diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h index d4cf70dc15..d251ff80b8 100644 --- a/target/tilegx/cpu.h +++ b/target/tilegx/cpu.h @@ -99,10 +99,8 @@ typedef struct CPUTLGState { #define TYPE_TILEGX_CPU "tilegx-cpu" -typedef struct TileGXCPU TileGXCPU; -typedef struct TileGXCPUClass TileGXCPUClass; -DECLARE_OBJ_CHECKERS(TileGXCPU, TileGXCPUClass, - TILEGX_CPU, TYPE_TILEGX_CPU) +OBJECT_DECLARE_TYPE(TileGXCPU, TileGXCPUClass, + tilegx_cpu, TILEGX_CPU) /** * TileGXCPUClass: diff --git a/target/tricore/cpu-qom.h b/target/tricore/cpu-qom.h index 1988c26093..9e588c4c34 100644 --- a/target/tricore/cpu-qom.h +++ b/target/tricore/cpu-qom.h @@ -24,10 +24,8 @@ #define TYPE_TRICORE_CPU "tricore-cpu" -typedef struct TriCoreCPU TriCoreCPU; -typedef struct TriCoreCPUClass TriCoreCPUClass; -DECLARE_OBJ_CHECKERS(TriCoreCPU, TriCoreCPUClass, - TRICORE_CPU, TYPE_TRICORE_CPU) +OBJECT_DECLARE_TYPE(TriCoreCPU, TriCoreCPUClass, + tricore_cpu, TRICORE_CPU) struct TriCoreCPUClass { /*< private >*/ diff --git a/target/unicore32/cpu-qom.h b/target/unicore32/cpu-qom.h index 5b67ac532d..c914273058 100644 --- a/target/unicore32/cpu-qom.h +++ b/target/unicore32/cpu-qom.h @@ -16,10 +16,8 @@ #define TYPE_UNICORE32_CPU "unicore32-cpu" -typedef struct UniCore32CPU UniCore32CPU; -typedef struct UniCore32CPUClass UniCore32CPUClass; -DECLARE_OBJ_CHECKERS(UniCore32CPU, UniCore32CPUClass, - UNICORE32_CPU, TYPE_UNICORE32_CPU) +OBJECT_DECLARE_TYPE(UniCore32CPU, UniCore32CPUClass, + unicore32_cpu, UNICORE32_CPU) /** * UniCore32CPUClass: diff --git a/target/xtensa/cpu-qom.h b/target/xtensa/cpu-qom.h index ef13262b42..299ce3e63c 100644 --- a/target/xtensa/cpu-qom.h +++ b/target/xtensa/cpu-qom.h @@ -34,10 +34,8 @@ #define TYPE_XTENSA_CPU "xtensa-cpu" -typedef struct XtensaCPU XtensaCPU; -typedef struct XtensaCPUClass XtensaCPUClass; -DECLARE_OBJ_CHECKERS(XtensaCPU, XtensaCPUClass, - XTENSA_CPU, TYPE_XTENSA_CPU) +OBJECT_DECLARE_TYPE(XtensaCPU, XtensaCPUClass, + xtensa_cpu, XTENSA_CPU) typedef struct XtensaConfig XtensaConfig; |