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

staging: usbip: vhci_tx.c: coding style cleanup

Fix a few alignment issues and remove extraneous lines.
Use ternary operator for pdup->base.direction assignment.
Signed-off-by: default avatarmatt mooney <mfm@muteddisk.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent bd608f6c
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "usbip_common.h" #include "usbip_common.h"
#include "vhci.h" #include "vhci.h"
static void setup_cmd_submit_pdu(struct usbip_header *pdup, struct urb *urb) static void setup_cmd_submit_pdu(struct usbip_header *pdup, struct urb *urb)
{ {
struct vhci_priv *priv = ((struct vhci_priv *)urb->hcpriv); struct vhci_priv *priv = ((struct vhci_priv *)urb->hcpriv);
...@@ -35,10 +34,8 @@ static void setup_cmd_submit_pdu(struct usbip_header *pdup, struct urb *urb) ...@@ -35,10 +34,8 @@ static void setup_cmd_submit_pdu(struct usbip_header *pdup, struct urb *urb)
pdup->base.command = USBIP_CMD_SUBMIT; pdup->base.command = USBIP_CMD_SUBMIT;
pdup->base.seqnum = priv->seqnum; pdup->base.seqnum = priv->seqnum;
pdup->base.devid = vdev->devid; pdup->base.devid = vdev->devid;
if (usb_pipein(urb->pipe)) pdup->base.direction = usb_pipein(urb->pipe) ?
pdup->base.direction = USBIP_DIR_IN; USBIP_DIR_IN : USBIP_DIR_OUT;
else
pdup->base.direction = USBIP_DIR_OUT;
pdup->base.ep = usb_pipeendpoint(urb->pipe); pdup->base.ep = usb_pipeendpoint(urb->pipe);
usbip_pack_pdu(pdup, urb, USBIP_CMD_SUBMIT, 1); usbip_pack_pdu(pdup, urb, USBIP_CMD_SUBMIT, 1);
...@@ -65,8 +62,6 @@ static struct vhci_priv *dequeue_from_priv_tx(struct vhci_device *vdev) ...@@ -65,8 +62,6 @@ static struct vhci_priv *dequeue_from_priv_tx(struct vhci_device *vdev)
return NULL; return NULL;
} }
static int vhci_send_cmd_submit(struct vhci_device *vdev) static int vhci_send_cmd_submit(struct vhci_device *vdev)
{ {
struct vhci_priv *priv = NULL; struct vhci_priv *priv = NULL;
...@@ -90,7 +85,6 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) ...@@ -90,7 +85,6 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev)
usbip_dbg_vhci_tx("setup txdata urb %p\n", urb); usbip_dbg_vhci_tx("setup txdata urb %p\n", urb);
/* 1. setup usbip_header */ /* 1. setup usbip_header */
setup_cmd_submit_pdu(&pdu_header, urb); setup_cmd_submit_pdu(&pdu_header, urb);
usbip_header_correct_endian(&pdu_header, 1); usbip_header_correct_endian(&pdu_header, 1);
...@@ -140,7 +134,6 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev) ...@@ -140,7 +134,6 @@ static int vhci_send_cmd_submit(struct vhci_device *vdev)
return total_size; return total_size;
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev) static struct vhci_unlink *dequeue_from_unlink_tx(struct vhci_device *vdev)
...@@ -182,7 +175,6 @@ static int vhci_send_cmd_unlink(struct vhci_device *vdev) ...@@ -182,7 +175,6 @@ static int vhci_send_cmd_unlink(struct vhci_device *vdev)
usbip_dbg_vhci_tx("setup cmd unlink, %lu\n", unlink->seqnum); usbip_dbg_vhci_tx("setup cmd unlink, %lu\n", unlink->seqnum);
/* 1. setup usbip_header */ /* 1. setup usbip_header */
pdu_header.base.command = USBIP_CMD_UNLINK; pdu_header.base.command = USBIP_CMD_UNLINK;
pdu_header.base.seqnum = unlink->seqnum; pdu_header.base.seqnum = unlink->seqnum;
...@@ -204,7 +196,6 @@ static int vhci_send_cmd_unlink(struct vhci_device *vdev) ...@@ -204,7 +196,6 @@ static int vhci_send_cmd_unlink(struct vhci_device *vdev)
return -1; return -1;
} }
usbip_dbg_vhci_tx("send txdata\n"); usbip_dbg_vhci_tx("send txdata\n");
total_size += txsize; total_size += txsize;
...@@ -213,7 +204,6 @@ static int vhci_send_cmd_unlink(struct vhci_device *vdev) ...@@ -213,7 +204,6 @@ static int vhci_send_cmd_unlink(struct vhci_device *vdev)
return total_size; return total_size;
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
int vhci_tx_loop(void *data) int vhci_tx_loop(void *data)
......
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