Skip to content
Commit 31162af4 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: dwc3: gadget: avoid while (1) loop on completion



We know that we have to iterate over the list of
started requests. Instead of looping forever, we can
rely on list_for_each_entry(). Likewise, instead of
a do {} while loop over all, maybe available,
scatterlist entries, we can detect if $this request
uses scatterlist and rely on for_each_sg().

This makes the code easier to follow while making
sure that we will *always* break out of the loop.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 08a36b54
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment