summaryrefslogtreecommitdiffstats
path: root/drivers/virtio
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@linux.intel.com>2016-08-11 14:38:37 +0300
committerFelipe Balbi <felipe.balbi@linux.intel.com>2016-08-22 10:45:37 +0300
commit31162af447d7afba6820e42ed9cf968ed74c64cd (patch)
tree4e2fe894f171787949b4139f46e323ba988625e0 /drivers/virtio
parent08a36b543803b7fe39b66ca0529bea34a88dc77f (diff)
downloadblackbird-obmc-linux-31162af447d7afba6820e42ed9cf968ed74c64cd.tar.gz
blackbird-obmc-linux-31162af447d7afba6820e42ed9cf968ed74c64cd.zip
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: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/virtio')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud