[Spice-devel] [PATCH v7 04/20] usb-backend: no emulated isoch devices
Victor Toso
victortoso at redhat.com
Thu Sep 19 08:16:31 UTC 2019
Hi,
On Wed, Sep 18, 2019 at 06:03:30AM -0400, Frediano Ziglio wrote:
> >
> > From: Yuri Benditovich <yuri.benditovich at daynix.com>
> >
> > 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 at redhat.com>
>
> 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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190919/a14e34ab/attachment.sig>
More information about the Spice-devel
mailing list