* [PATCH 1/2] USB: chaoskey: fix Alea quirk on big-endian hosts
[not found] <20170511093602.20833-1-johan@kernel.org>
@ 2017-05-11 9:36 ` Johan Hovold
2017-05-11 9:36 ` [PATCH 2/2] USB: iowarrior: fix info ioctl " Johan Hovold
1 sibling, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2017-05-11 9:36 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-usb, Johan Hovold, stable, Bob Ham, Herbert Xu, Keith Packard
Add missing endianness conversion when applying the Alea timeout quirk.
Found using sparse:
warning: restricted __le16 degrades to integer
Fixes: e4a886e811cd ("hwrng: chaoskey - Fix URB warning due to timeout on Alea")
Cc: stable <stable@vger.kernel.org> # 4.8
Cc: Bob Ham <bob.ham@collabora.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/misc/chaoskey.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/misc/chaoskey.c b/drivers/usb/misc/chaoskey.c
index e9cae4d82af2..15d4e64d3b65 100644
--- a/drivers/usb/misc/chaoskey.c
+++ b/drivers/usb/misc/chaoskey.c
@@ -192,7 +192,7 @@ static int chaoskey_probe(struct usb_interface *interface,
dev->in_ep = in_ep;
- if (udev->descriptor.idVendor != ALEA_VENDOR_ID)
+ if (le16_to_cpu(udev->descriptor.idVendor) != ALEA_VENDOR_ID)
dev->reads_started = 1;
dev->size = size;
--
2.13.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] USB: iowarrior: fix info ioctl on big-endian hosts
[not found] <20170511093602.20833-1-johan@kernel.org>
2017-05-11 9:36 ` [PATCH 1/2] USB: chaoskey: fix Alea quirk on big-endian hosts Johan Hovold
@ 2017-05-11 9:36 ` Johan Hovold
1 sibling, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2017-05-11 9:36 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-usb, Johan Hovold, stable
Drop erroneous le16_to_cpu when returning the USB device speed which is
already in host byte order.
Found using sparse:
warning: cast to restricted __le16
Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.")
Cc: stable <stable@vger.kernel.org> # 2.6.21
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/misc/iowarrior.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 77569531b78a..83b05a287b0c 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -554,7 +554,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd,
info.revision = le16_to_cpu(dev->udev->descriptor.bcdDevice);
/* 0==UNKNOWN, 1==LOW(usb1.1) ,2=FULL(usb1.1), 3=HIGH(usb2.0) */
- info.speed = le16_to_cpu(dev->udev->speed);
+ info.speed = dev->udev->speed;
info.if_num = dev->interface->cur_altsetting->desc.bInterfaceNumber;
info.report_size = dev->report_size;
--
2.13.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-11 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20170511093602.20833-1-johan@kernel.org>
2017-05-11 9:36 ` [PATCH 1/2] USB: chaoskey: fix Alea quirk on big-endian hosts Johan Hovold
2017-05-11 9:36 ` [PATCH 2/2] USB: iowarrior: fix info ioctl " Johan Hovold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.