[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 7/8] cpus: Change exec_init() arg to cpu, not
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH v3 7/8] cpus: Change exec_init() arg to cpu, not env |
Date: |
Tue, 23 Jun 2015 19:09:26 -0700 |
On Thu, Jun 18, 2015 at 12:35 PM, Eduardo Habkost <address@hidden> wrote:
> On Thu, Jun 18, 2015 at 10:24:54AM -0700, Peter Crosthwaite wrote:
> [...]
>> diff --git a/exec.c b/exec.c
>> index b1c8aae..7fc1950 100644
>> --- a/exec.c
>> +++ b/exec.c
>> @@ -554,9 +554,8 @@ void cpu_exec_exit(CPUState *cpu)
>> }
>> #endif
>>
>> -void cpu_exec_init(CPUArchState *env, Error **errp)
>> +void cpu_exec_init(CPUState *cpu, Error **errp)
>> {
>> - CPUState *cpu = ENV_GET_CPU(env);
>> CPUClass *cc = CPU_GET_CLASS(cpu);
>> int cpu_index;
>> Error *local_err = NULL;
>> @@ -585,6 +584,7 @@ void cpu_exec_init(CPUArchState *env, Error **errp)
>> vmstate_register(NULL, cpu_index, &vmstate_cpu_common, cpu);
>> }
>> #if defined(CPU_SAVE_VERSION) && !defined(CONFIG_USER_ONLY)
>> + CPUArchState *env = cpu->env_ptr;
>
> Mixed declarations (declarations that are not a the beginning of a
> block) are not allowed by QEMU coding style. It looks simpler to just
> eliminate the variable and use cpu->env_ptr directly at the
> register_savevm() call below.
>
Fixed in v4.
Regards,
Peter
>> register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION,
>> cpu_save, cpu_load, env);
>> assert(cc->vmsd == NULL);
>
> --
> Eduardo
>
- [Qemu-devel] [PATCH v3 1/8] cpus: Add Error argument to cpu_exec_init(), (continued)
- [Qemu-devel] [PATCH v3 1/8] cpus: Add Error argument to cpu_exec_init(), Peter Crosthwaite, 2015/06/18
- [Qemu-devel] [PATCH v3 3/8] ppc: Move cpu_exec_init() call to realize function, Peter Crosthwaite, 2015/06/18
- [Qemu-devel] [PATCH v3 5/8] gdbserver: _fork: Change fn to accept cpu instead of env, Peter Crosthwaite, 2015/06/18
- [Qemu-devel] [PATCH v3 4/8] translate-all: Change tb_flush() env argument to cpu, Peter Crosthwaite, 2015/06/18
- [Qemu-devel] [PATCH v3 6/8] cpus: Change tcg_cpu_exec arg to cpu, not env, Peter Crosthwaite, 2015/06/18
- [Qemu-devel] [PATCH v3 2/8] cpus: Convert cpu_index into a bitmap, Peter Crosthwaite, 2015/06/18
- [Qemu-devel] [PATCH v3 7/8] cpus: Change exec_init() arg to cpu, not env, Peter Crosthwaite, 2015/06/18
- [Qemu-devel] [PATCH v3 8/8] cpu-exec: Purge all uses of ENV_GET_CPU(), Peter Crosthwaite, 2015/06/18
- Re: [Qemu-devel] [PATCH v3 0/8] More core code ENV_GET_CPU removals, Eduardo Habkost, 2015/06/18