[Spice-devel] [PATCH spice-server 04/13] spicevmc: Remove reds parameter from spicevmc_device_disconnect

Frediano Ziglio fziglio at redhat.com
Fri Jun 21 07:35:31 UTC 2019


ping

> 
> ping
> 
> > 
> > Unused.
> > Also the devices should be able to release themselves.
> > 
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> >  server/char-device.h | 3 +--
> >  server/reds.c        | 2 +-
> >  server/spicevmc.c    | 2 +-
> >  3 files changed, 3 insertions(+), 4 deletions(-)
> > 
> > diff --git a/server/char-device.h b/server/char-device.h
> > index 5327c25e5..9700df997 100644
> > --- a/server/char-device.h
> > +++ b/server/char-device.h
> > @@ -237,8 +237,7 @@ void red_char_device_write_buffer_release(RedCharDevice
> > *dev,
> >  RedCharDevice *spicevmc_device_connect(RedsState *reds,
> >                                         SpiceCharDeviceInstance *sin,
> >                                         uint8_t channel_type);
> > -void spicevmc_device_disconnect(RedsState *reds,
> > -                                SpiceCharDeviceInstance *char_device);
> > +void spicevmc_device_disconnect(SpiceCharDeviceInstance *char_device);
> >  
> >  SpiceCharDeviceInterface
> >  *spice_char_device_get_interface(SpiceCharDeviceInstance *instance);
> >  
> > diff --git a/server/reds.c b/server/reds.c
> > index 792e98381..7043e4d2a 100644
> > --- a/server/reds.c
> > +++ b/server/reds.c
> > @@ -3379,7 +3379,7 @@ static int
> > spice_server_char_device_remove_interface(RedsState *reds, SpiceBaseI
> >  #endif
> >      else if (strcmp(char_device->subtype, SUBTYPE_USBREDIR) == 0 ||
> >               strcmp(char_device->subtype, SUBTYPE_PORT) == 0) {
> > -        spicevmc_device_disconnect(reds, char_device);
> > +        spicevmc_device_disconnect(char_device);
> >      } else {
> >          spice_warning("failed to remove char device %s",
> >          char_device->subtype);
> >      }
> > diff --git a/server/spicevmc.c b/server/spicevmc.c
> > index 460edb04f..bfe3cf6e5 100644
> > --- a/server/spicevmc.c
> > +++ b/server/spicevmc.c
> > @@ -812,7 +812,7 @@ RedCharDevice *spicevmc_device_connect(RedsState *reds,
> >  }
> >  
> >  /* Must be called from RedClient handling thread. */
> > -void spicevmc_device_disconnect(RedsState *reds, SpiceCharDeviceInstance
> > *sin)
> > +void spicevmc_device_disconnect(SpiceCharDeviceInstance *sin)
> >  {
> >      g_object_unref(RED_CHAR_DEVICE(sin->st));
> >      sin->st = NULL;


More information about the Spice-devel mailing list