[PATCH v3 6/7] usb: gadget: bdc: remove unnecessary AND operation when get ep maxp
Chunfeng Yun
chunfeng.yun at mediatek.com
Thu Aug 12 23:30:52 PDT 2021
usb_endpoint_maxp() already returns actual max packet size, no need
to AND 0x7ff.
Acked-by: Felipe Balbi <balbi at kernel.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun at mediatek.com>
---
v3: fix typo suggested by Sergei
v2: add acked-by felipe
---
drivers/usb/gadget/udc/bdc/bdc_cmd.c | 1 -
1 file changed, 1 deletion(-)
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;
--
2.18.0
More information about the Linux-mediatek
mailing list