All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Crosthwaite <crosthwaitepeter@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Jia Liu <proljc@gmail.com>,
	Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	Anthony Green <green@moxielogic.com>,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
	Blue Swirl <blauwirbel@gmail.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Michael Walle <michael@walle.cc>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Guan Xuetao <gxt@mprc.pku.edu.cn>,
	Leon Alrae <leon.alrae@imgtec.com>,
	afaerber@suse.de, aurelien@aurel32.net, rth@twiddle.net
Subject: Re: [Qemu-devel] [PATCH v3 7/8] cpus: Change exec_init() arg to cpu, not env
Date: Thu, 18 Jun 2015 16:35:37 -0300	[thread overview]
Message-ID: <20150618193537.GJ3874@thinpad.lan.raisama.net> (raw)
In-Reply-To: <1434648295-30584-8-git-send-email-crosthwaite.peter@gmail.com>

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.

>      register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION,
>                      cpu_save, cpu_load, env);
>      assert(cc->vmsd == NULL);

-- 
Eduardo

  reply	other threads:[~2015-06-18 19:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-18 17:24 [Qemu-devel] [PATCH v3 0/8] More core code ENV_GET_CPU removals Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 1/8] cpus: Add Error argument to cpu_exec_init() Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 2/8] cpus: Convert cpu_index into a bitmap Peter Crosthwaite
2015-07-02 15:45   ` Andreas Färber
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 3/8] ppc: Move cpu_exec_init() call to realize function Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 4/8] translate-all: Change tb_flush() env argument to cpu Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 5/8] gdbserver: _fork: Change fn to accept cpu instead of env Peter Crosthwaite
2015-06-18 19:23   ` Eduardo Habkost
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 6/8] cpus: Change tcg_cpu_exec arg to cpu, not env Peter Crosthwaite
2015-06-18 19:30   ` Eduardo Habkost
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 7/8] cpus: Change exec_init() " Peter Crosthwaite
2015-06-18 19:35   ` Eduardo Habkost [this message]
2015-06-24  2:09     ` Peter Crosthwaite
2015-06-18 17:24 ` [Qemu-devel] [PATCH v3 8/8] cpu-exec: Purge all uses of ENV_GET_CPU() Peter Crosthwaite
2015-06-24  2:10   ` Peter Crosthwaite
2015-06-24 17:32     ` Andreas Färber
2015-06-24 17:50       ` Peter Crosthwaite
2015-06-25 16:15       ` Andreas Färber
2015-06-18 19:22 ` [Qemu-devel] [PATCH v3 0/8] More core code ENV_GET_CPU removals Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150618193537.GJ3874@thinpad.lan.raisama.net \
    --to=ehabkost@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=green@moxielogic.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=jcmvbkbc@gmail.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=leon.alrae@imgtec.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=michael@walle.cc \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=proljc@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.