Skip to content

Commit db9fc50

Browse files
Colin Ian Kinggregkh
authored andcommitted
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>
1 parent ec81419 commit db9fc50

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/usb/dwc3/ep0.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -973,15 +973,12 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,
973973
ret = dwc3_ep0_start_trans(dep);
974974
} else if (IS_ALIGNED(req->request.length, dep->endpoint.maxpacket) &&
975975
req->request.length && req->request.zero) {
976-
u32 maxpacket;
977976

978977
ret = usb_gadget_map_request_by_dev(dwc->sysdev,
979978
&req->request, dep->number);
980979
if (ret)
981980
return;
982981

983-
maxpacket = dep->endpoint.maxpacket;
984-
985982
/* prepare normal TRB */
986983
dwc3_ep0_prepare_one_trb(dep, req->request.dma,
987984
req->request.length,

0 commit comments

Comments
 (0)