diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2021-08-13 14:30:53 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-13 13:05:51 +0200 |
commit | 97d99f7e8f1ccaa18d6447f4a3b0b48ed64aa214 (patch) | |
tree | dd6cd6132e199fd9af489fce4c970db0889ac407 /include/linux/usb | |
parent | b553c9466fa54d29e314659117b0b24719f24bd3 (diff) | |
download | linux-next-97d99f7e8f1ccaa18d6447f4a3b0b48ed64aa214.tar.gz |
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 <balbi@kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1628836253-7432-7-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/gadget.h | 2 |
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); } |