[Spice-devel] [RFC PATCH 01/16] OT: small optimization

Christophe Fergeau cfergeau at redhat.com
Wed Jan 25 13:54:06 UTC 2017


No commit log, no real-world performance measurements showing this is needed,
...

On Wed, Jan 25, 2017 at 12:42:24PM +0000, Frediano Ziglio wrote:
> ---
>  server/char-device.c | 6 ------
>  server/char-device.h | 6 +++++-
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/server/char-device.c b/server/char-device.c
> index c40ed65..7c86f76 100644
> --- a/server/char-device.c
> +++ b/server/char-device.c
> @@ -976,12 +976,6 @@ SpiceServer* red_char_device_get_server(RedCharDevice *dev)
>      return dev->priv->reds;
>  }
>  
> -SpiceCharDeviceInterface *spice_char_device_get_interface(SpiceCharDeviceInstance *instance)
> -{
> -   return SPICE_UPCAST(SpiceCharDeviceInterface, instance->base.sif);
> -}
> -
> -
>  static void red_char_device_init_device_instance(RedCharDevice *self)
>  {
>      SpiceCharDeviceInterface *sif;
> diff --git a/server/char-device.h b/server/char-device.h
> index 3b87023..761ff2b 100644
> --- a/server/char-device.h
> +++ b/server/char-device.h
> @@ -236,6 +236,10 @@ RedCharDevice *spicevmc_device_connect(RedsState *reds,
>  void spicevmc_device_disconnect(RedsState *reds,
>                                  SpiceCharDeviceInstance *char_device);
>  
> -SpiceCharDeviceInterface *spice_char_device_get_interface(SpiceCharDeviceInstance *instance);
> +static inline SpiceCharDeviceInterface *
> +spice_char_device_get_interface(SpiceCharDeviceInstance *instance)
> +{
> +   return SPICE_UPCAST(SpiceCharDeviceInterface, instance->base.sif);
> +}
>  
>  #endif // CHAR_DEVICE_H_
> -- 
> git-series 0.9.1
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170125/f3ca9dd4/attachment.sig>


More information about the Spice-devel mailing list