OSDN Git Service

usb: misc: usbtest: remove duplicate & operation
authorJaejoong Kim <climbbb.kim@gmail.com>
Fri, 20 Oct 2017 07:29:15 +0000 (16:29 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Oct 2017 09:31:05 +0000 (11:31 +0200)
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0]
by & operation with 0x7ff. So, we can remove the duplicate & operation
with 0x7ff.

Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usbtest.c

index b3fc602..3639e00 100644 (file)
@@ -1909,7 +1909,7 @@ static struct urb *iso_alloc_urb(
 
        if (bytes < 0 || !desc)
                return NULL;
-       maxp = 0x7ff & usb_endpoint_maxp(desc);
+       maxp = usb_endpoint_maxp(desc);
        maxp *= usb_endpoint_maxp_mult(desc);
        packets = DIV_ROUND_UP(bytes, maxp);