From nobody Wed May 1 02:03:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518451808860676.129821998635; Mon, 12 Feb 2018 08:10:08 -0800 (PST) Received: from localhost ([::1]:46640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elGgB-0004Ta-O9 for importer@patchew.org; Mon, 12 Feb 2018 11:10:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elGLt-00046g-Rc for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:49:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elGLp-0000Ro-P6 for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:49:09 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59026 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1elGLp-0000QF-LI for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:49:05 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3376883155; Mon, 12 Feb 2018 15:49:05 +0000 (UTC) Received: from dgilbert-t530.redhat.com (ovpn-117-179.ams2.redhat.com [10.36.117.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 667D72166BAE; Mon, 12 Feb 2018 15:49:04 +0000 (UTC) From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, rth@twiddle.net, agraf@suse.de, david@redhat.com Date: Mon, 12 Feb 2018 15:49:03 +0000 Message-Id: <20180212154903.8859-1-dgilbert@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 12 Feb 2018 15:49:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 12 Feb 2018 15:49:05 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dgilbert@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH] s390/stattrib: Make SaveVMHandlers data static X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" There's no need for this to be dynamic, make it static. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Claudio Imbrenda Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth --- 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_enable= d(Object *obj, bool value, s->migration_enabled =3D value; } =20 +static SaveVMHandlers savevm_s390_stattrib_handlers =3D { + .save_setup =3D cmma_save_setup, + .save_live_iterate =3D cmma_save_iterate, + .save_live_complete_precopy =3D cmma_save_complete, + .save_live_pending =3D cmma_save_pending, + .save_cleanup =3D cmma_save_cleanup, + .load_state =3D cmma_load, + .is_active =3D cmma_active, +}; + static void s390_stattrib_instance_init(Object *obj) { S390StAttribState *sas =3D S390_STATTRIB(obj); - SaveVMHandlers *ops; - - /* ops will always be freed by qemu when unregistering */ - ops =3D g_new0(SaveVMHandlers, 1); - - ops->save_setup =3D cmma_save_setup; - ops->save_live_iterate =3D cmma_save_iterate; - ops->save_live_complete_precopy =3D cmma_save_complete; - ops->save_live_pending =3D cmma_save_pending; - ops->save_cleanup =3D cmma_save_cleanup; - ops->load_state =3D cmma_load; - ops->is_active =3D 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); =20 object_property_add_bool(obj, "migration-enabled", s390_stattrib_get_migration_enabled, --=20 2.14.3