diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:17 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | 30b5707c269cac1ad80b72f777e52c8e08b2ff19 (patch) | |
tree | 7201b93d5b438b3a608040e71b10ffec73f9c980 /target | |
parent | c734cd40a10943753a4d015c9d0a6c08c8f0159e (diff) | |
download | qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.zip qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.tar.gz qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.tar.bz2 |
qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
One 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);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200916182519.415636-4-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/alpha/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/arm/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/avr/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/cris/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/hppa/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/i386/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/lm32/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/m68k/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/microblaze/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/mips/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/moxie/cpu.h | 2 | ||||
-rw-r--r-- | target/nios2/cpu.h | 2 | ||||
-rw-r--r-- | target/openrisc/cpu.h | 2 | ||||
-rw-r--r-- | target/ppc/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/riscv/cpu.h | 2 | ||||
-rw-r--r-- | target/rx/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/s390x/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/sh4/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/sparc/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/tilegx/cpu.h | 2 | ||||
-rw-r--r-- | target/tricore/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/unicore32/cpu-qom.h | 2 | ||||
-rw-r--r-- | target/xtensa/cpu-qom.h | 2 |
23 files changed, 23 insertions, 23 deletions
diff --git a/target/alpha/cpu-qom.h b/target/alpha/cpu-qom.h index 568fe3f..7bb9173 100644 --- a/target/alpha/cpu-qom.h +++ b/target/alpha/cpu-qom.h @@ -26,7 +26,7 @@ #define TYPE_ALPHA_CPU "alpha-cpu" OBJECT_DECLARE_TYPE(AlphaCPU, AlphaCPUClass, - alpha_cpu, ALPHA_CPU) + ALPHA_CPU) /** * AlphaCPUClass: diff --git a/target/arm/cpu-qom.h b/target/arm/cpu-qom.h index 94bbbd4..a22bd50 100644 --- a/target/arm/cpu-qom.h +++ b/target/arm/cpu-qom.h @@ -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 diff --git a/target/avr/cpu-qom.h b/target/avr/cpu-qom.h index 49d63fa..9fa6989 100644 --- a/target/avr/cpu-qom.h +++ b/target/avr/cpu-qom.h @@ -27,7 +27,7 @@ #define TYPE_AVR_CPU "avr-cpu" OBJECT_DECLARE_TYPE(AVRCPU, AVRCPUClass, - avr_cpu, AVR_CPU) + AVR_CPU) /** * AVRCPUClass: diff --git a/target/cris/cpu-qom.h b/target/cris/cpu-qom.h index 2b03281..2596edc 100644 --- a/target/cris/cpu-qom.h +++ b/target/cris/cpu-qom.h @@ -26,7 +26,7 @@ #define TYPE_CRIS_CPU "cris-cpu" OBJECT_DECLARE_TYPE(CRISCPU, CRISCPUClass, - cris_cpu, CRIS_CPU) + CRIS_CPU) /** * CRISCPUClass: diff --git a/target/hppa/cpu-qom.h b/target/hppa/cpu-qom.h index 58158f3..d424f88 100644 --- a/target/hppa/cpu-qom.h +++ b/target/hppa/cpu-qom.h @@ -26,7 +26,7 @@ #define TYPE_HPPA_CPU "hppa-cpu" OBJECT_DECLARE_TYPE(HPPACPU, HPPACPUClass, - hppa_cpu, HPPA_CPU) + HPPA_CPU) /** * HPPACPUClass: diff --git a/target/i386/cpu-qom.h b/target/i386/cpu-qom.h index 0505472..f9923ce 100644 --- a/target/i386/cpu-qom.h +++ b/target/i386/cpu-qom.h @@ -31,7 +31,7 @@ #endif OBJECT_DECLARE_TYPE(X86CPU, X86CPUClass, - x86_cpu, X86_CPU) + X86_CPU) typedef struct X86CPUModel X86CPUModel; diff --git a/target/lm32/cpu-qom.h b/target/lm32/cpu-qom.h index e9eb495..245b35c 100644 --- a/target/lm32/cpu-qom.h +++ b/target/lm32/cpu-qom.h @@ -26,7 +26,7 @@ #define TYPE_LM32_CPU "lm32-cpu" OBJECT_DECLARE_TYPE(LM32CPU, LM32CPUClass, - lm32_cpu, LM32_CPU) + LM32_CPU) /** * LM32CPUClass: diff --git a/target/m68k/cpu-qom.h b/target/m68k/cpu-qom.h index a10429c..1ceb160 100644 --- a/target/m68k/cpu-qom.h +++ b/target/m68k/cpu-qom.h @@ -26,7 +26,7 @@ #define TYPE_M68K_CPU "m68k-cpu" OBJECT_DECLARE_TYPE(M68kCPU, M68kCPUClass, - m68k_cpu, M68K_CPU) + M68K_CPU) /* * M68kCPUClass: diff --git a/target/microblaze/cpu-qom.h b/target/microblaze/cpu-qom.h index 82734b9..e520eef 100644 --- a/target/microblaze/cpu-qom.h +++ b/target/microblaze/cpu-qom.h @@ -26,7 +26,7 @@ #define TYPE_MICROBLAZE_CPU "microblaze-cpu" OBJECT_DECLARE_TYPE(MicroBlazeCPU, MicroBlazeCPUClass, - microblaze_cpu, MICROBLAZE_CPU) + MICROBLAZE_CPU) /** * MicroBlazeCPUClass: diff --git a/target/mips/cpu-qom.h b/target/mips/cpu-qom.h index 93fbbdc..826ab13 100644 --- a/target/mips/cpu-qom.h +++ b/target/mips/cpu-qom.h @@ -30,7 +30,7 @@ #endif OBJECT_DECLARE_TYPE(MIPSCPU, MIPSCPUClass, - mips_cpu, MIPS_CPU) + MIPS_CPU) /** * MIPSCPUClass: diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index d58761c..bd6ab66 100644 --- a/target/moxie/cpu.h +++ b/target/moxie/cpu.h @@ -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: diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 1fa0fda..86bbe1d 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -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: diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index d0a8ee6..bd42faf 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -30,7 +30,7 @@ struct OpenRISCCPU; #define TYPE_OPENRISC_CPU "or1k-cpu" OBJECT_DECLARE_TYPE(OpenRISCCPU, OpenRISCCPUClass, - openrisc_cpu, OPENRISC_CPU) + OPENRISC_CPU) /** * OpenRISCCPUClass: diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h index 5cf806a..5fdb96f 100644 --- a/target/ppc/cpu-qom.h +++ b/target/ppc/cpu-qom.h @@ -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; diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 4c00d35..de27578 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -234,7 +234,7 @@ struct CPURISCVState { }; OBJECT_DECLARE_TYPE(RISCVCPU, RISCVCPUClass, - riscv_cpu, RISCV_CPU) + RISCV_CPU) /** * RISCVCPUClass: diff --git a/target/rx/cpu-qom.h b/target/rx/cpu-qom.h index 6c53210..7310558 100644 --- a/target/rx/cpu-qom.h +++ b/target/rx/cpu-qom.h @@ -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: diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h index e2b2513..9f3a0d8 100644 --- a/target/s390x/cpu-qom.h +++ b/target/s390x/cpu-qom.h @@ -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; diff --git a/target/sh4/cpu-qom.h b/target/sh4/cpu-qom.h index 595814b..8903b4b 100644 --- a/target/sh4/cpu-qom.h +++ b/target/sh4/cpu-qom.h @@ -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: diff --git a/target/sparc/cpu-qom.h b/target/sparc/cpu-qom.h index 5d7fb72..f33949a 100644 --- a/target/sparc/cpu-qom.h +++ b/target/sparc/cpu-qom.h @@ -30,7 +30,7 @@ #endif OBJECT_DECLARE_TYPE(SPARCCPU, SPARCCPUClass, - sparc_cpu, 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 d251ff8..c194c1a 100644 --- a/target/tilegx/cpu.h +++ b/target/tilegx/cpu.h @@ -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: diff --git a/target/tricore/cpu-qom.h b/target/tricore/cpu-qom.h index 9e588c4..59bfd01 100644 --- a/target/tricore/cpu-qom.h +++ b/target/tricore/cpu-qom.h @@ -25,7 +25,7 @@ #define TYPE_TRICORE_CPU "tricore-cpu" OBJECT_DECLARE_TYPE(TriCoreCPU, TriCoreCPUClass, - tricore_cpu, TRICORE_CPU) + TRICORE_CPU) struct TriCoreCPUClass { /*< private >*/ diff --git a/target/unicore32/cpu-qom.h b/target/unicore32/cpu-qom.h index c914273..43621e7 100644 --- a/target/unicore32/cpu-qom.h +++ b/target/unicore32/cpu-qom.h @@ -17,7 +17,7 @@ #define TYPE_UNICORE32_CPU "unicore32-cpu" OBJECT_DECLARE_TYPE(UniCore32CPU, UniCore32CPUClass, - unicore32_cpu, UNICORE32_CPU) + UNICORE32_CPU) /** * UniCore32CPUClass: diff --git a/target/xtensa/cpu-qom.h b/target/xtensa/cpu-qom.h index 299ce3e..41d9859 100644 --- a/target/xtensa/cpu-qom.h +++ b/target/xtensa/cpu-qom.h @@ -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; |