Commit 2663d79b authored by Stefan Reif's avatar Stefan Reif Committed by Greg Kroah-Hartman

staging: usbip: reformat function pickup_urb_and_free_priv

re-indent funtion "pickup_urb_and_free_priv" to improve readability.
Signed-off-by: default avatarStefan Reif <ke42caxa@cip.cs.fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c5a73ee2
...@@ -31,33 +31,37 @@ struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum) ...@@ -31,33 +31,37 @@ struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum)
int status; int status;
list_for_each_entry_safe(priv, tmp, &vdev->priv_rx, list) { list_for_each_entry_safe(priv, tmp, &vdev->priv_rx, list) {
if (priv->seqnum == seqnum) { if (priv->seqnum != seqnum)
urb = priv->urb; continue;
status = urb->status;
urb = priv->urb;
usbip_dbg_vhci_rx("find urb %p vurb %p seqnum %u\n", status = urb->status;
urb, priv, seqnum);
usbip_dbg_vhci_rx("find urb %p vurb %p seqnum %u\n",
/* TODO: fix logic here to improve indent situtation */ urb, priv, seqnum);
if (status != -EINPROGRESS) {
if (status == -ENOENT || switch (status) {
status == -ECONNRESET) case -ENOENT:
dev_info(&urb->dev->dev, /* fall through */
"urb %p was unlinked " case -ECONNRESET:
"%ssynchronuously.\n", urb, dev_info(&urb->dev->dev,
status == -ENOENT ? "" : "a"); "urb %p was unlinked %ssynchronuously.\n", urb,
else status == -ENOENT ? "" : "a");
dev_info(&urb->dev->dev, break;
"urb %p may be in a error, " case -EINPROGRESS:
"status %d\n", urb, status); /* no info output */
}
list_del(&priv->list);
kfree(priv);
urb->hcpriv = NULL;
break; break;
default:
dev_info(&urb->dev->dev,
"urb %p may be in a error, status %d\n", urb,
status);
} }
list_del(&priv->list);
kfree(priv);
urb->hcpriv = NULL;
break;
} }
return urb; return urb;
......
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