Commit 64f338ed authored by matt mooney's avatar matt mooney Committed by Greg Kroah-Hartman

staging: usbip: stub_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 6c033b46
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "stub.h" #include "stub.h"
#include <linux/usb/hcd.h> #include <linux/usb/hcd.h>
static int is_clear_halt_cmd(struct urb *urb) static int is_clear_halt_cmd(struct urb *urb)
{ {
struct usb_ctrlrequest *req; struct usb_ctrlrequest *req;
...@@ -122,8 +121,8 @@ static int tweak_set_interface_cmd(struct urb *urb) ...@@ -122,8 +121,8 @@ static int tweak_set_interface_cmd(struct urb *urb)
alternate = le16_to_cpu(req->wValue); alternate = le16_to_cpu(req->wValue);
interface = le16_to_cpu(req->wIndex); interface = le16_to_cpu(req->wIndex);
usbip_dbg_stub_rx("set_interface: inf %u alt %u\n", interface, usbip_dbg_stub_rx("set_interface: inf %u alt %u\n",
alternate); interface, alternate);
ret = usb_set_interface(urb->dev, interface, alternate); ret = usb_set_interface(urb->dev, interface, alternate);
if (ret < 0) if (ret < 0)
...@@ -131,8 +130,7 @@ static int tweak_set_interface_cmd(struct urb *urb) ...@@ -131,8 +130,7 @@ static int tweak_set_interface_cmd(struct urb *urb)
interface, alternate, ret); interface, alternate, ret);
else else
usbip_uinfo("set_interface done: inf %u alt %u\n", usbip_uinfo("set_interface done: inf %u alt %u\n",
interface, interface, alternate);
alternate);
return ret; return ret;
} }
...@@ -161,8 +159,8 @@ static int tweak_set_configuration_cmd(struct urb *urb) ...@@ -161,8 +159,8 @@ static int tweak_set_configuration_cmd(struct urb *urb)
* A user may need to set a special configuration value before * A user may need to set a special configuration value before
* exporting the device. * exporting the device.
*/ */
usbip_uinfo("set_configuration (%d) to %s\n", config, usbip_uinfo("set_configuration %d to %s\n",
dev_name(&urb->dev->dev)); config, dev_name(&urb->dev->dev));
usbip_uinfo("but, skip!\n"); usbip_uinfo("but, skip!\n");
return 0; return 0;
...@@ -234,7 +232,6 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev, ...@@ -234,7 +232,6 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev,
struct stub_priv *priv; struct stub_priv *priv;
spin_lock_irqsave(&sdev->priv_lock, flags); spin_lock_irqsave(&sdev->priv_lock, flags);
list_for_each_entry(priv, &sdev->priv_init, list) { list_for_each_entry(priv, &sdev->priv_init, list) {
...@@ -301,7 +298,6 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev, ...@@ -301,7 +298,6 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev,
spin_unlock_irqrestore(&sdev->priv_lock, flags); spin_unlock_irqrestore(&sdev->priv_lock, flags);
return 0; return 0;
} }
...@@ -370,8 +366,6 @@ static int get_pipe(struct stub_device *sdev, int epnum, int dir) ...@@ -370,8 +366,6 @@ static int get_pipe(struct stub_device *sdev, int epnum, int dir)
} }
epd = &ep->desc; epd = &ep->desc;
#if 0 #if 0
/* epnum 0 is always control */ /* epnum 0 is always control */
if (epnum == 0) { if (epnum == 0) {
...@@ -381,7 +375,6 @@ static int get_pipe(struct stub_device *sdev, int epnum, int dir) ...@@ -381,7 +375,6 @@ static int get_pipe(struct stub_device *sdev, int epnum, int dir)
return usb_rcvctrlpipe(udev, 0); return usb_rcvctrlpipe(udev, 0);
} }
#endif #endif
if (usb_endpoint_xfer_control(epd)) { if (usb_endpoint_xfer_control(epd)) {
if (dir == USBIP_DIR_OUT) if (dir == USBIP_DIR_OUT)
return usb_sndctrlpipe(udev, epnum); return usb_sndctrlpipe(udev, epnum);
...@@ -478,7 +471,6 @@ static void stub_recv_cmd_submit(struct stub_device *sdev, ...@@ -478,7 +471,6 @@ static void stub_recv_cmd_submit(struct stub_device *sdev,
struct usb_device *udev = sdev->udev; struct usb_device *udev = sdev->udev;
int pipe = get_pipe(sdev, pdu->base.ep, pdu->base.direction); int pipe = get_pipe(sdev, pdu->base.ep, pdu->base.direction);
priv = stub_priv_alloc(sdev, pdu); priv = stub_priv_alloc(sdev, pdu);
if (!priv) if (!priv)
return; return;
...@@ -604,7 +596,6 @@ static void stub_rx_pdu(struct usbip_device *ud) ...@@ -604,7 +596,6 @@ static void stub_rx_pdu(struct usbip_device *ud)
usbip_event_add(ud, SDEV_EVENT_ERROR_TCP); usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
return; return;
} }
} }
int stub_rx_loop(void *data) int stub_rx_loop(void *data)
...@@ -617,5 +608,6 @@ int stub_rx_loop(void *data) ...@@ -617,5 +608,6 @@ int stub_rx_loop(void *data)
stub_rx_pdu(ud); stub_rx_pdu(ud);
} }
return 0; return 0;
} }
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