qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
To: David Hildenbrand <david@redhat.com>
Cc: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, rth@twiddle.net, agraf@suse.de,
	qemu-s390x <qemu-s390x@nongnu.org>,
	Cornelia Huck <cohuck@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] s390/stattrib: Make SaveVMHandlers data static
Date: Mon, 12 Feb 2018 17:45:36 +0100	[thread overview]
Message-ID: <20180212174536.6e3a72b6@p-imbrenda.boeblingen.de.ibm.com> (raw)
In-Reply-To: <d95d8112-9d0b-e471-b45a-51c50850feab@redhat.com>

On Mon, 12 Feb 2018 16:52:08 +0100
David Hildenbrand <david@redhat.com> wrote:

> On 12.02.2018 16:49, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > There's no need for this to be dynamic, make it static.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  hw/s390x/s390-stattrib.c | 26 +++++++++++++-------------
> >  1 file changed, 13 insertions(+), 13 deletions(-)
> > 
> > diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
> > index a1d2135a60..adf07ef312 100644
> > --- a/hw/s390x/s390-stattrib.c
> > +++ b/hw/s390x/s390-stattrib.c
> > @@ -365,22 +365,22 @@ static inline void
> > s390_stattrib_set_migration_enabled(Object *obj, bool value,
> > s->migration_enabled = value; }
> >  
> > +static SaveVMHandlers savevm_s390_stattrib_handlers = {
> > +    .save_setup = cmma_save_setup,
> > +    .save_live_iterate = cmma_save_iterate,
> > +    .save_live_complete_precopy = cmma_save_complete,
> > +    .save_live_pending = cmma_save_pending,
> > +    .save_cleanup = cmma_save_cleanup,
> > +    .load_state = cmma_load,
> > +    .is_active = cmma_active,
> > +};
> > +
> >  static void s390_stattrib_instance_init(Object *obj)
> >  {
> >      S390StAttribState *sas = S390_STATTRIB(obj);
> > -    SaveVMHandlers *ops;
> > -
> > -    /* ops will always be freed by qemu when unregistering */
> > -    ops = g_new0(SaveVMHandlers, 1);
> > -
> > -    ops->save_setup = cmma_save_setup;
> > -    ops->save_live_iterate = cmma_save_iterate;
> > -    ops->save_live_complete_precopy = cmma_save_complete;
> > -    ops->save_live_pending = cmma_save_pending;
> > -    ops->save_cleanup = cmma_save_cleanup;
> > -    ops->load_state = cmma_load;
> > -    ops->is_active = cmma_active;
> > -    register_savevm_live(NULL, TYPE_S390_STATTRIB, 0, 0, ops, sas);
> > +
> > +    register_savevm_live(NULL, TYPE_S390_STATTRIB, 0, 0,
> > +                         &savevm_s390_stattrib_handlers, sas);
> >  
> >      object_property_add_bool(obj, "migration-enabled",
> >                               s390_stattrib_get_migration_enabled,
> >   
> 
> Looks sane to me.
> 
> Reviewed-by: David Hildenbrand <david@redhat.com>


Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>

  reply	other threads:[~2018-02-12 16:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 15:49 [Qemu-devel] [PATCH] s390/stattrib: Make SaveVMHandlers data static Dr. David Alan Gilbert (git)
2018-02-12 15:52 ` David Hildenbrand
2018-02-12 16:45   ` Claudio Imbrenda [this message]
2018-02-12 16:19 ` Thomas Huth
2018-02-12 17:06 ` Richard Henderson
2018-02-13  9:23 ` Cornelia Huck

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=20180212174536.6e3a72b6@p-imbrenda.boeblingen.de.ibm.com \
    --to=imbrenda@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).