mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
bulk: Call in place single use cpu_env()
Avoid CPUArchState local variable when cpu_env() is used once. Mechanical patch using the following Coccinelle spatch script: @@ type CPUArchState; identifier env; expression cs; @@ { - CPUArchState *env = cpu_env(cs); ... when != env - env + cpu_env(cs) ... when != env } Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240129164514.73104-5-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
97e0310601
commit
94956d7b51
9 changed files with 16 additions and 31 deletions
|
@ -323,8 +323,8 @@ void cpu_loop(CPUX86State *env)
|
|||
|
||||
static void target_cpu_free(void *obj)
|
||||
{
|
||||
CPUArchState *env = cpu_env(obj);
|
||||
target_munmap(env->gdt.base, sizeof(uint64_t) * TARGET_GDT_ENTRIES);
|
||||
target_munmap(cpu_env(obj)->gdt.base,
|
||||
sizeof(uint64_t) * TARGET_GDT_ENTRIES);
|
||||
g_free(obj);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue