Commit 50c72a46 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman

usb: dwc3: gadget: Remove redundant assignment to pointer trb

The pointer trb is being assigned a value that is not being
read afterwards, it is being re-assigned later inside a for_each_sg
loop. The assignment is redundant and can be removed.

Cleans up clang scan warning:
drivers/usb/dwc3/gadget.c:3432:19: warning: Value stored to 'trb'
during its initialization is never read [deadcode.DeadStores]
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20240207120319.2445123-1-colin.i.king@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b311048c
...@@ -3416,7 +3416,7 @@ static int dwc3_gadget_ep_reclaim_trb_sg(struct dwc3_ep *dep, ...@@ -3416,7 +3416,7 @@ static int dwc3_gadget_ep_reclaim_trb_sg(struct dwc3_ep *dep,
struct dwc3_request *req, const struct dwc3_event_depevt *event, struct dwc3_request *req, const struct dwc3_event_depevt *event,
int status) int status)
{ {
struct dwc3_trb *trb = &dep->trb_pool[dep->trb_dequeue]; struct dwc3_trb *trb;
struct scatterlist *sg = req->sg; struct scatterlist *sg = req->sg;
struct scatterlist *s; struct scatterlist *s;
unsigned int num_queued = req->num_queued_sgs; unsigned int num_queued = req->num_queued_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