On 20-09-29 15:41:14, kernel test robot wrote: > All warnings (new ones prefixed by >>): > > drivers/usb/cdns3/gadget.c: In function 'cdns3_wa2_descmiss_copy_data': > >> drivers/usb/cdns3/gadget.c:509:7: warning: variable 'length' set but not used [-Wunused-but-set-variable] > 509 | int length; > | ^~~~~~ > > vim +/length +509 drivers/usb/cdns3/gadget.c > > f12b2ec1c423979 Peter Chen 2020-09-10 494 > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 495 /** > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 496 * cdns3_wa2_descmiss_copy_data copy data from internal requests to > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 497 * request queued by class driver. > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 498 * @priv_ep: extended endpoint object > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 499 * @request: request object > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 500 */ > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 501 static void cdns3_wa2_descmiss_copy_data(struct cdns3_endpoint *priv_ep, > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 502 struct usb_request *request) > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 503 { > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 504 struct usb_request *descmiss_req; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 505 struct cdns3_request *descmiss_priv_req; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 506 > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 507 while (!list_empty(&priv_ep->wa2_descmiss_req_list)) { > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 508 int chunk_end; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 @509 int length; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 510 > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 511 descmiss_priv_req = > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 512 cdns3_next_priv_request(&priv_ep->wa2_descmiss_req_list); > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 513 descmiss_req = &descmiss_priv_req->request; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 514 > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 515 /* driver can't touch pending request */ > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 516 if (descmiss_priv_req->flags & REQUEST_PENDING) > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 517 break; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 518 > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 519 chunk_end = descmiss_priv_req->flags & REQUEST_INTERNAL_CH; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 520 length = request->actual + descmiss_req->actual; The "length" is used here. This logic is existed one year ago, and not introduced during recent patches. Peter > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 521 request->status = descmiss_req->status; > f12b2ec1c423979 Peter Chen 2020-09-10 522 __cdns3_descmiss_copy_data(request, descmiss_req); > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 523 list_del_init(&descmiss_priv_req->list); > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 524 kfree(descmiss_req->buf); > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 525 cdns3_gadget_ep_free_request(&priv_ep->endpoint, descmiss_req); > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 526 --priv_ep->wa2_counter; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 527 > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 528 if (!chunk_end) > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 529 break; > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 530 } > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 531 } > 6bbf87a131edd39 Pawel Laszczak 2019-08-26 532 > > :::::: The code at line 509 was first introduced by commit > :::::: 6bbf87a131edd39040974f3843ff97e89310ebde usb:cdns3 Fix for stuck packets in on-chip OUT buffer. > > :::::: TO: Pawel Laszczak <pawell@xxxxxxxxxxx> > :::::: CC: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx> > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01.org%2Fhyperkitty%2Flist%2Fkbuild-all%40lists.01.org&data=02%7C01%7Cpeter.chen%40nxp.com%7Ceb44b3a98d6249fb88f808d8644b2c46%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637369624019300389&sdata=0Nz5ERcQp2BxO5q7uuiIjW3O8Sw6pbyDw1Q9QsqG5Fg%3D&reserved=0 -- Thanks, Peter Chen