Commit 6d9d22da authored by Felipe Balbi's avatar Felipe Balbi

usb: dwc3: gadget: get rid of the length variable

Code is just as readable without it.
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent fee73e61
......@@ -2315,10 +2315,8 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
struct dwc3_request *tmp;
list_for_each_entry_safe(req, tmp, &dep->started_list, list) {
unsigned length;
int ret;
length = req->request.length;
if (req->num_pending_sgs)
ret = dwc3_gadget_ep_reclaim_trb_sg(dep, req, event,
status);
......@@ -2333,7 +2331,7 @@ static void dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
req->zero = false;
}
req->request.actual = length - req->remaining;
req->request.actual = req->request.length - req->remaining;
if (!dwc3_gadget_ep_request_completed(req) ||
req->num_pending_sgs) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment