[RFT/PATCH 32/38] usb: dwc3: gadget: get rid of the length variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Code is just as readable without it.

Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
---
 drivers/usb/dwc3/gadget.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 3a4013bc61d8..c515104ba86d 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2290,10 +2290,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);
@@ -2308,7 +2306,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) {
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux