projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b553c94
)
usb: gadget: remove unnecessary AND operation when get ep maxp
author
Chunfeng Yun
<chunfeng.yun@mediatek.com>
Fri, 13 Aug 2021 06:30:53 +0000
(14:30 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 13 Aug 2021 11:05:51 +0000
(13:05 +0200)
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>
include/linux/usb/gadget.h
patch
|
blob
|
history
diff --git
a/include/linux/usb/gadget.h
b/include/linux/usb/gadget.h
index 776851e577413730b9153ad03d9a2d977d756a3a..10fe57cf40beca6a9ef8a5244975c4a6b3d590c8 100644
(file)
--- 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);
}