[Spice-devel] [PATCH v7 04/20] usb-backend: no emulated isoch devices
Frediano Ziglio
fziglio at redhat.com
Wed Sep 18 10:03:30 UTC 2019
>
> 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?
>
> t#
typo ?
> ---
> 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.
> + /* 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.
Frediano
More information about the Spice-devel
mailing list