patch "USB: iowarrior: fix info ioctl on big-endian hosts" added to usb-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
USB: iowarrior: fix info ioctl on big-endian hosts
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
Quoted 1 line
From
dd5ca753fa92fb736b1395db892bd29f78e6d408Mon Sep 17 00:00:00 2001
From: Johan Hovold <[email protected]>
Date: Thu, 11 May 2017 11:36:02 +0200
Subject: USB: iowarrior: fix info ioctl on big-endian hosts
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
--- drivers/usb/misc/iowarrior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/misc/iowarrior.c +1 -1
@@ -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;
Signature · 1 line
2.13.0