Skip to content

Commit

Permalink
usb: misc: usbtest: remove duplicate & operation
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
jazzguitar81 authored and gregkh committed Oct 23, 2017
1 parent e7eef2c commit 9f8e32d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/misc/usbtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 9f8e32d

Please sign in to comment.