qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 06/17] vmstate: Make vmstate_register() static inline
Date: Tue, 12 Mar 2013 10:49:07 +0100	[thread overview]
Message-ID: <1363081758-12913-7-git-send-email-afaerber@suse.de> (raw)
In-Reply-To: <1363081758-12913-1-git-send-email-afaerber@suse.de>

This avoids adding a duplicate stub for CONFIG_USER_ONLY.

Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/migration/vmstate.h |   12 ++++++++++--
 savevm.c                    |    7 -------
 2 Dateien geändert, 10 Zeilen hinzugefügt(+), 9 Zeilen entfernt(-)

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index a64db94..20db76f 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -638,12 +638,20 @@ int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
                        void *opaque, int version_id);
 void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
                         void *opaque);
-int vmstate_register(DeviceState *dev, int instance_id,
-                     const VMStateDescription *vmsd, void *base);
+
 int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
                                    const VMStateDescription *vmsd,
                                    void *base, int alias_id,
                                    int required_for_version);
+
+static inline int vmstate_register(DeviceState *dev, int instance_id,
+                                   const VMStateDescription *vmsd,
+                                   void *opaque)
+{
+    return vmstate_register_with_alias_id(dev, instance_id, vmsd,
+                                          opaque, -1, 0);
+}
+
 void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
                         void *opaque);
 
diff --git a/savevm.c b/savevm.c
index 147e2d2..35c8d1e 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1423,13 +1423,6 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id,
     return 0;
 }
 
-int vmstate_register(DeviceState *dev, int instance_id,
-                     const VMStateDescription *vmsd, void *opaque)
-{
-    return vmstate_register_with_alias_id(dev, instance_id, vmsd,
-                                          opaque, -1, 0);
-}
-
 void vmstate_unregister(DeviceState *dev, const VMStateDescription *vmsd,
                         void *opaque)
 {
-- 
1.7.10.4

  parent reply	other threads:[~2013-03-12  9:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-12  9:49 [Qemu-devel] [PULL 00/17] QOM CPUState patch queue 2013-03-12 Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 01/17] cpu: Fix qemu_get_cpu() to return NULL if CPU not found Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 02/17] monitor: Use qemu_get_cpu() in monitor_set_cpu() Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 03/17] cpus: Replace open-coded CPU loop in qmp_memsave() with qemu_get_cpu() Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 04/17] target-sh4: Introduce SuperHCPU subclasses Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 05/17] target-sh4: Move PVR/PRR/CVR into SuperHCPUClass Andreas Färber
2013-03-12  9:49 ` Andreas Färber [this message]
2013-03-12  9:49 ` [Qemu-devel] [PATCH 07/17] stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 08/17] cpu: Register VMStateDescription through CPUState Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 09/17] cpu: Introduce cpu_class_set_vmsd() Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 10/17] target-i386: Update VMStateDescription to X86CPU Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 11/17] target-cris/helper.c: Update Coding Style Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 12/17] cpu: Move halted and interrupt_request fields to CPUState Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 13/17] exec: Pass CPUState to cpu_reset_interrupt() Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 14/17] cpu: Pass CPUState to cpu_interrupt() Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 15/17] cpu: Replace do_interrupt() by CPUClass::do_interrupt method Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 16/17] target-arm: Override do_interrupt for ARMv7-M profile Andreas Färber
2013-03-12  9:49 ` [Qemu-devel] [PATCH 17/17] target-lm32: Update VMStateDescription to LM32CPU Andreas Färber

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=1363081758-12913-7-git-send-email-afaerber@suse.de \
    --to=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    /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).