mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 07:01:32 +00:00
usb: dwc3: gadget: remove redundant variable maxpacket
Variable maxpacket is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'maxpacket' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ec81419310
commit
db9fc500e8
@ -973,15 +973,12 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
|
|||||||
ret = dwc3_ep0_start_trans(dep);
|
ret = dwc3_ep0_start_trans(dep);
|
||||||
} else if (IS_ALIGNED(req->request.length, dep->endpoint.maxpacket) &&
|
} else if (IS_ALIGNED(req->request.length, dep->endpoint.maxpacket) &&
|
||||||
req->request.length && req->request.zero) {
|
req->request.length && req->request.zero) {
|
||||||
u32 maxpacket;
|
|
||||||
|
|
||||||
ret = usb_gadget_map_request_by_dev(dwc->sysdev,
|
ret = usb_gadget_map_request_by_dev(dwc->sysdev,
|
||||||
&req->request, dep->number);
|
&req->request, dep->number);
|
||||||
if (ret)
|
if (ret)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
maxpacket = dep->endpoint.maxpacket;
|
|
||||||
|
|
||||||
/* prepare normal TRB */
|
/* prepare normal TRB */
|
||||||
dwc3_ep0_prepare_one_trb(dep, req->request.dma,
|
dwc3_ep0_prepare_one_trb(dep, req->request.dma,
|
||||||
req->request.length,
|
req->request.length,
|
||||||
|
Loading…
Reference in New Issue
Block a user