Received: from eggs.gnu.org ([2001:4830:134:3::10]:39646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elGP8-000760-G6 for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:52:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elGP5-0004gy-Oc for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:52:30 -0500 References: <20180212154903.8859-1-dgilbert@redhat.com> From: David Hildenbrand Message-ID: Date: Mon, 12 Feb 2018 16:52:08 +0100 MIME-Version: 1.0 In-Reply-To: <20180212154903.8859-1-dgilbert@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] s390/stattrib: Make SaveVMHandlers data static List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" , qemu-devel@nongnu.org, rth@twiddle.net, agraf@suse.de Cc: Cornelia Huck , qemu-s390x On 12.02.2018 16:49, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > There's no need for this to be dynamic, make it static. > > Signed-off-by: Dr. David Alan Gilbert > --- > 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 -- Thanks, David / dhildenb