diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-29 17:44:48 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2024-03-12 11:46:16 +0100 |
commit | 348802b526e6449a97635dfcc38030cd00b56d27 (patch) | |
tree | 417bb717808f38837db2752606948a8c9a0473a0 /target/xtensa/cpu.c | |
parent | 94956d7b510d18f4449d1392b86e1a8f3e467612 (diff) |
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>
Diffstat (limited to 'target/xtensa/cpu.c')
-rw-r--r-- | target/xtensa/cpu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 79f91819df..c1cedf3f35 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -95,9 +95,9 @@ bool xtensa_abi_call0(void) static void xtensa_cpu_reset_hold(Object *obj) { - CPUState *s = CPU(obj); - XtensaCPU *cpu = XTENSA_CPU(s); - XtensaCPUClass *xcc = XTENSA_CPU_GET_CLASS(cpu); + CPUState *cs = CPU(obj); + XtensaCPU *cpu = XTENSA_CPU(cs); + XtensaCPUClass *xcc = XTENSA_CPU_GET_CLASS(obj); CPUXtensaState *env = &cpu->env; bool dfpu = xtensa_option_enabled(env->config, XTENSA_OPTION_DFP_COPROCESSOR); @@ -132,7 +132,7 @@ static void xtensa_cpu_reset_hold(Object *obj) #ifndef CONFIG_USER_ONLY reset_mmu(env); - s->halted = env->runstall; + cs->halted = env->runstall; #endif set_no_signaling_nans(!dfpu, &env->fp_status); set_use_first_nan(!dfpu, &env->fp_status); |