Commit 5ef6aceb authored by matt mooney's avatar matt mooney Committed by Greg Kroah-Hartman

staging: usbip: vhci_rx.c: coding style cleanup

Fix alignment for consistency and remove extraneous lines.
Signed-off-by: default avatarmatt mooney <mfm@muteddisk.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 071d1d47
......@@ -23,10 +23,8 @@
#include "usbip_common.h"
#include "vhci.h"
/* get URB from transmitted urb queue. caller must hold vdev->priv_lock */
struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev,
__u32 seqnum)
struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum)
{
struct vhci_priv *priv, *tmp;
struct urb *urb = NULL;
......@@ -72,9 +70,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
struct urb *urb;
spin_lock(&vdev->priv_lock);
urb = pickup_urb_and_free_priv(vdev, pdu->base.seqnum);
spin_unlock(&vdev->priv_lock);
if (!urb) {
......@@ -86,16 +82,13 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
return;
}
/* unpack the pdu to a urb */
usbip_pack_pdu(pdu, urb, USBIP_RET_SUBMIT, 0);
/* recv transfer buffer */
if (usbip_recv_xbuff(ud, urb) < 0)
return;
/* recv iso_packet_descriptor */
if (usbip_recv_iso(ud, urb) < 0)
return;
......@@ -107,7 +100,6 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
if (usbip_dbg_flag_vhci_rx)
usbip_dump_urb(urb);
usbip_dbg_vhci_rx("now giveback urb %p\n", urb);
spin_lock(&the_controller->lock);
......@@ -116,13 +108,11 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
usb_hcd_giveback_urb(vhci_to_hcd(the_controller), urb, urb->status);
usbip_dbg_vhci_rx("Leave\n");
return;
}
static struct vhci_unlink *dequeue_pending_unlink(struct vhci_device *vdev,
struct usbip_header *pdu)
{
......@@ -147,7 +137,6 @@ static struct vhci_unlink *dequeue_pending_unlink(struct vhci_device *vdev,
return NULL;
}
static void vhci_recv_ret_unlink(struct vhci_device *vdev,
struct usbip_header *pdu)
{
......@@ -164,9 +153,7 @@ static void vhci_recv_ret_unlink(struct vhci_device *vdev,
}
spin_lock(&vdev->priv_lock);
urb = pickup_urb_and_free_priv(vdev, unlink->unlink_seqnum);
spin_unlock(&vdev->priv_lock);
if (!urb) {
......@@ -202,9 +189,7 @@ static int vhci_priv_tx_empty(struct vhci_device *vdev)
int empty = 0;
spin_lock(&vdev->priv_lock);
empty = list_empty(&vdev->priv_rx);
spin_unlock(&vdev->priv_lock);
return empty;
......@@ -217,7 +202,6 @@ static void vhci_rx_pdu(struct usbip_device *ud)
struct usbip_header pdu;
struct vhci_device *vdev = container_of(ud, struct vhci_device, ud);
usbip_dbg_vhci_rx("Enter\n");
memset(&pdu, 0, sizeof(pdu));
......@@ -270,14 +254,12 @@ static void vhci_rx_pdu(struct usbip_device *ud)
}
}
/*-------------------------------------------------------------------------*/
int vhci_rx_loop(void *data)
{
struct usbip_device *ud = data;
while (!kthread_should_stop()) {
if (usbip_event_happened(ud))
break;
......
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