aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/usbnet.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-12-03 02:58:21 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-03 16:18:01 -0500
commit8e95a2026f3b43f7c3d676adaccd2de9532e8dcc (patch)
tree3733318168cd512480b6db58c5c16d1c8847f0b7 /drivers/net/usb/usbnet.c
parent3454f835837609d60b29a266e3bd9d701073b060 (diff)
drivers/net: Move && and || to end of previous line
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r--drivers/net/usb/usbnet.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 04f3f289e87c..511e7bdc4573 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -140,8 +140,8 @@ int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
140 if (!alt || !in || !out) 140 if (!alt || !in || !out)
141 return -EINVAL; 141 return -EINVAL;
142 142
143 if (alt->desc.bAlternateSetting != 0 143 if (alt->desc.bAlternateSetting != 0 ||
144 || !(dev->driver_info->flags & FLAG_NO_SETINT)) { 144 !(dev->driver_info->flags & FLAG_NO_SETINT)) {
145 tmp = usb_set_interface (dev->udev, alt->desc.bInterfaceNumber, 145 tmp = usb_set_interface (dev->udev, alt->desc.bInterfaceNumber,
146 alt->desc.bAlternateSetting); 146 alt->desc.bAlternateSetting);
147 if (tmp < 0) 147 if (tmp < 0)
@@ -351,9 +351,9 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
351 351
352 spin_lock_irqsave (&dev->rxq.lock, lockflags); 352 spin_lock_irqsave (&dev->rxq.lock, lockflags);
353 353
354 if (netif_running (dev->net) 354 if (netif_running (dev->net) &&
355 && netif_device_present (dev->net) 355 netif_device_present (dev->net) &&
356 && !test_bit (EVENT_RX_HALT, &dev->flags)) { 356 !test_bit (EVENT_RX_HALT, &dev->flags)) {
357 switch (retval = usb_submit_urb (urb, GFP_ATOMIC)) { 357 switch (retval = usb_submit_urb (urb, GFP_ATOMIC)) {
358 case -EPIPE: 358 case -EPIPE:
359 usbnet_defer_kevent (dev, EVENT_RX_HALT); 359 usbnet_defer_kevent (dev, EVENT_RX_HALT);
@@ -391,8 +391,8 @@ static void rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags)
391 391
392static inline void rx_process (struct usbnet *dev, struct sk_buff *skb) 392static inline void rx_process (struct usbnet *dev, struct sk_buff *skb)
393{ 393{
394 if (dev->driver_info->rx_fixup 394 if (dev->driver_info->rx_fixup &&
395 && !dev->driver_info->rx_fixup (dev, skb)) 395 !dev->driver_info->rx_fixup (dev, skb))
396 goto error; 396 goto error;
397 // else network stack removes extra byte if we forced a short packet 397 // else network stack removes extra byte if we forced a short packet
398 398
@@ -484,8 +484,8 @@ block:
484 defer_bh(dev, skb, &dev->rxq); 484 defer_bh(dev, skb, &dev->rxq);
485 485
486 if (urb) { 486 if (urb) {
487 if (netif_running (dev->net) 487 if (netif_running (dev->net) &&
488 && !test_bit (EVENT_RX_HALT, &dev->flags)) { 488 !test_bit (EVENT_RX_HALT, &dev->flags)) {
489 rx_submit (dev, urb, GFP_ATOMIC); 489 rx_submit (dev, urb, GFP_ATOMIC);
490 return; 490 return;
491 } 491 }
@@ -649,9 +649,9 @@ int usbnet_stop (struct net_device *net)
649 unlink_urbs(dev, &dev->rxq); 649 unlink_urbs(dev, &dev->rxq);
650 650
651 /* maybe wait for deletions to finish. */ 651 /* maybe wait for deletions to finish. */
652 while (!skb_queue_empty(&dev->rxq) 652 while (!skb_queue_empty(&dev->rxq) &&
653 && !skb_queue_empty(&dev->txq) 653 !skb_queue_empty(&dev->txq) &&
654 && !skb_queue_empty(&dev->done)) { 654 !skb_queue_empty(&dev->done)) {
655 msleep(UNLINK_TIMEOUT_MS); 655 msleep(UNLINK_TIMEOUT_MS);
656 if (netif_msg_ifdown(dev)) 656 if (netif_msg_ifdown(dev))
657 devdbg(dev, "waited for %d urb completions", 657 devdbg(dev, "waited for %d urb completions",
@@ -882,9 +882,9 @@ kevent (struct work_struct *work)
882 if (test_bit (EVENT_TX_HALT, &dev->flags)) { 882 if (test_bit (EVENT_TX_HALT, &dev->flags)) {
883 unlink_urbs (dev, &dev->txq); 883 unlink_urbs (dev, &dev->txq);
884 status = usb_clear_halt (dev->udev, dev->out); 884 status = usb_clear_halt (dev->udev, dev->out);
885 if (status < 0 885 if (status < 0 &&
886 && status != -EPIPE 886 status != -EPIPE &&
887 && status != -ESHUTDOWN) { 887 status != -ESHUTDOWN) {
888 if (netif_msg_tx_err (dev)) 888 if (netif_msg_tx_err (dev))
889 deverr (dev, "can't clear tx halt, status %d", 889 deverr (dev, "can't clear tx halt, status %d",
890 status); 890 status);
@@ -897,9 +897,9 @@ kevent (struct work_struct *work)
897 if (test_bit (EVENT_RX_HALT, &dev->flags)) { 897 if (test_bit (EVENT_RX_HALT, &dev->flags)) {
898 unlink_urbs (dev, &dev->rxq); 898 unlink_urbs (dev, &dev->rxq);
899 status = usb_clear_halt (dev->udev, dev->in); 899 status = usb_clear_halt (dev->udev, dev->in);
900 if (status < 0 900 if (status < 0 &&
901 && status != -EPIPE 901 status != -EPIPE &&
902 && status != -ESHUTDOWN) { 902 status != -ESHUTDOWN) {
903 if (netif_msg_rx_err (dev)) 903 if (netif_msg_rx_err (dev))
904 deverr (dev, "can't clear rx halt, status %d", 904 deverr (dev, "can't clear rx halt, status %d",
905 status); 905 status);
@@ -1126,10 +1126,10 @@ static void usbnet_bh (unsigned long param)
1126 } 1126 }
1127 1127
1128 // or are we maybe short a few urbs? 1128 // or are we maybe short a few urbs?
1129 } else if (netif_running (dev->net) 1129 } else if (netif_running (dev->net) &&
1130 && netif_device_present (dev->net) 1130 netif_device_present (dev->net) &&
1131 && !timer_pending (&dev->delay) 1131 !timer_pending (&dev->delay) &&
1132 && !test_bit (EVENT_RX_HALT, &dev->flags)) { 1132 !test_bit (EVENT_RX_HALT, &dev->flags)) {
1133 int temp = dev->rxq.qlen; 1133 int temp = dev->rxq.qlen;
1134 int qlen = RX_QLEN (dev); 1134 int qlen = RX_QLEN (dev);
1135 1135
@@ -1297,8 +1297,8 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1297 // heuristic: "usb%d" for links we know are two-host, 1297 // heuristic: "usb%d" for links we know are two-host,
1298 // else "eth%d" when there's reasonable doubt. userspace 1298 // else "eth%d" when there's reasonable doubt. userspace
1299 // can rename the link if it knows better. 1299 // can rename the link if it knows better.
1300 if ((dev->driver_info->flags & FLAG_ETHER) != 0 1300 if ((dev->driver_info->flags & FLAG_ETHER) != 0 &&
1301 && (net->dev_addr [0] & 0x02) == 0) 1301 (net->dev_addr [0] & 0x02) == 0)
1302 strcpy (net->name, "eth%d"); 1302 strcpy (net->name, "eth%d");
1303 /* WLAN devices should always be named "wlan%d" */ 1303 /* WLAN devices should always be named "wlan%d" */
1304 if ((dev->driver_info->flags & FLAG_WLAN) != 0) 1304 if ((dev->driver_info->flags & FLAG_WLAN) != 0)