qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3] vmstate: Make vmstate_register() static inli


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v3] vmstate: Make vmstate_register() static inline
Date: Tue, 19 Feb 2013 10:44:31 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Feb 18, 2013 at 09:47:15PM +0100, Andreas Färber wrote:
> This avoids adding a duplicate stub for CONFIG_USER_ONLY.
> 
> Suggested-by: Eduardo Habkost <address@hidden>
> Signed-off-by: Andreas Färber <address@hidden>

Reviewed-by: Eduardo Habkost <address@hidden>

> ---
>  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 f27276c..6d50f6e 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -623,12 +623,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 a8a53ef..9a4031a 100644
> --- a/savevm.c
> +++ b/savevm.c
> @@ -1380,13 +1380,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
> 

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]