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)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Fri, 20 Oct 2017 08:19:39 +0000 (11:19 +0300)
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: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/misc/usbtest.c

index eee82ca..2d4306c 100644 (file)
@@ -1908,7 +1908,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);