diff mbox series

[v2,6/7] usb: gadget: bdc: remove unnecessary AND operation when get ep maxp

Message ID 1628774283-475-6-git-send-email-chunfeng.yun@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/7] usb: mtu3: restore HS function when set SS/SSP | expand

Commit Message

Chunfeng Yun Aug. 12, 2021, 1:18 p.m. UTC
usb_endpoint_maxp() already returns actual max packet size, no need
AND 0x7ff.

Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v2: add acked-by felipe
---
 drivers/usb/gadget/udc/bdc/bdc_cmd.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Sergey Shtylyov Aug. 12, 2021, 4:15 p.m. UTC | #1
On 8/12/21 4:18 PM, Chunfeng Yun wrote:

> usb_endpoint_maxp() already returns actual max packet size, no need

  "No ndeed to", perhaps?

> AND 0x7ff.
> 
> Acked-by: Felipe Balbi <balbi@kernel.org>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
[...]

MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.c b/drivers/usb/gadget/udc/bdc/bdc_cmd.c
index 995f79c79f96..67887316a1a6 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_cmd.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_cmd.c
@@ -153,7 +153,6 @@  int bdc_config_ep(struct bdc *bdc, struct bdc_ep *ep)
 	si = clamp_val(si, 1, 16) - 1;
 
 	mps = usb_endpoint_maxp(desc);
-	mps &= 0x7ff;
 	param2 |= mps << MP_SHIFT;
 	param2 |= usb_endpoint_type(desc) << EPT_SHIFT;