Re: [PATCH v7 04/20] usb-backend: no emulated isoch devices

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

 



Hi,

On Wed, Sep 18, 2019 at 06:03:30AM -0400, Frediano Ziglio wrote:
> > 
> > From: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx>
> > 
> > SpiceUsbBackendDevice deals with real and emulated devices but there
> > is no plans to implement emulated isochronous devices.
> > 
> > This patch adds check to edev (emulated device) in the guard, fix the
> > return value to FALSE instead of plain 0 and return early in case the
> > code path is around emulated devices.
> > 
> > This is a preparatory patch to extend emulated devices support.
> > 
> > Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
> 
> Should not also have the signed-off from original author?

Yes

> > t#
> 
> typo ?

Yes

> > ---
> >  src/usb-backend.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/usb-backend.c b/src/usb-backend.c
> > index 5b52a40..3258240 100644
> > --- a/src/usb-backend.c
> > +++ b/src/usb-backend.c
> > @@ -357,11 +357,17 @@ gboolean
> > spice_usb_backend_device_isoch(SpiceUsbBackendDevice *dev)
> >      gint i, j, k;
> >      int rc;
> >  
> > +    g_return_val_if_fail(libdev != NULL || dev->edev != NULL, FALSE);
> > +
> > +    if (dev->edev) {
> 
> "!= NULL" ? Sometimes we use sometimes not, not strong about.

For new code it is better to add the explicit check indeed

> 
> > +        /* currently we do not emulate isoch devices */
> > +        return FALSE;
> > +    }
> > +
> >      if (dev->cached_isochronous_valid) {
> >          return dev->cached_isochronous;
> >      }
> >  
> > -    g_return_val_if_fail(libdev != NULL, 0);
> >  
> >      rc = libusb_get_active_config_descriptor(libdev, &conf_desc);
> >      if (rc) {
> 
> Otherwise fine for me.

Thanks,

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]