aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunfeng Yun <[email protected]>2021-08-13 14:30:53 +0800
committerGreg Kroah-Hartman <[email protected]>2021-08-13 13:05:51 +0200
commit97d99f7e8f1ccaa18d6447f4a3b0b48ed64aa214 (patch)
treedd6cd6132e199fd9af489fce4c970db0889ac407
parentb553c9466fa54d29e314659117b0b24719f24bd3 (diff)
usb: gadget: remove unnecessary AND operation when get ep maxp
usb_endpoint_maxp() already returns actual max packet size, no need to AND 0x7ff. Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--include/linux/usb/gadget.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 776851e57741..10fe57cf40be 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -492,7 +492,7 @@ extern char *usb_get_gadget_udc_name(void);
*/
static inline size_t usb_ep_align(struct usb_ep *ep, size_t len)
{
- int max_packet_size = (size_t)usb_endpoint_maxp(ep->desc) & 0x7ff;
+ int max_packet_size = (size_t)usb_endpoint_maxp(ep->desc);
return round_up(len, max_packet_size);
}