On Thu, Jun 18, 2015 at 12:35 PM, Eduardo Habkost <ehabk...@redhat.com> 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
>

Reply via email to