]> git.proxmox.com Git - mirror_qemu.git/commit
target: Replace CPU_GET_CLASS(cpu -> obj) in cpu_reset_hold() handler
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 29 Jan 2024 16:44:48 +0000 (17:44 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 12 Mar 2024 10:46:16 +0000 (11:46 +0100)
commit348802b526e6449a97635dfcc38030cd00b56d27
tree417bb717808f38837db2752606948a8c9a0473a0
parent94956d7b510d18f4449d1392b86e1a8f3e467612
target: Replace CPU_GET_CLASS(cpu -> obj) in cpu_reset_hold() handler

Since CPU() macro is a simple cast, the following are equivalent:

  Object *obj;
  CPUState *cs = CPU(obj)

In order to ease static analysis when running
scripts/coccinelle/cpu_env.cocci from the previous commit,
replace:

 - CPU_GET_CLASS(cpu);
 + CPU_GET_CLASS(obj);

Most code use the 'cs' variable name for CPUState handle.
Replace few 's' -> 'cs' to unify cpu_reset_hold() style.

No logical change in this patch.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240129164514.73104-7-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
18 files changed:
target/arm/cpu.c
target/avr/cpu.c
target/cris/cpu.c
target/hexagon/cpu.c
target/i386/cpu.c
target/loongarch/cpu.c
target/m68k/cpu.c
target/microblaze/cpu.c
target/mips/cpu.c
target/nios2/cpu.c
target/openrisc/cpu.c
target/ppc/cpu_init.c
target/riscv/cpu.c
target/rx/cpu.c
target/sh4/cpu.c
target/sparc/cpu.c
target/tricore/cpu.c
target/xtensa/cpu.c