aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
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/irda
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/irda')
-rw-r--r--drivers/net/irda/irda-usb.c8
-rw-r--r--drivers/net/irda/stir4200.c12
-rw-r--r--drivers/net/irda/via-ircc.c16
-rw-r--r--drivers/net/irda/vlsi_ir.c16
4 files changed, 26 insertions, 26 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index ae6eab3e5eed..e8e33bb9d876 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -1124,11 +1124,11 @@ static int stir421x_patch_device(struct irda_usb_cb *self)
1124 * The actual image starts after the "STMP" keyword 1124 * The actual image starts after the "STMP" keyword
1125 * so forward to the firmware header tag 1125 * so forward to the firmware header tag
1126 */ 1126 */
1127 for (i = 0; (fw->data[i] != STIR421X_PATCH_END_OF_HDR_TAG) 1127 for (i = 0; (fw->data[i] != STIR421X_PATCH_END_OF_HDR_TAG) &&
1128 && (i < fw->size); i++) ; 1128 (i < fw->size); i++) ;
1129 /* here we check for the out of buffer case */ 1129 /* here we check for the out of buffer case */
1130 if ((STIR421X_PATCH_END_OF_HDR_TAG == fw->data[i]) 1130 if ((STIR421X_PATCH_END_OF_HDR_TAG == fw->data[i]) &&
1131 && (i < STIR421X_PATCH_CODE_OFFSET)) { 1131 (i < STIR421X_PATCH_CODE_OFFSET)) {
1132 if (!memcmp(fw->data + i + 1, STIR421X_PATCH_STMP_TAG, 1132 if (!memcmp(fw->data + i + 1, STIR421X_PATCH_STMP_TAG,
1133 sizeof(STIR421X_PATCH_STMP_TAG) - 1)) { 1133 sizeof(STIR421X_PATCH_STMP_TAG) - 1)) {
1134 1134
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
index 528767dec9d7..e5698fa30a4f 100644
--- a/drivers/net/irda/stir4200.c
+++ b/drivers/net/irda/stir4200.c
@@ -612,16 +612,16 @@ static int fifo_txwait(struct stir_cb *stir, int space)
612 pr_debug("fifo status 0x%lx count %lu\n", status, count); 612 pr_debug("fifo status 0x%lx count %lu\n", status, count);
613 613
614 /* is fifo receiving already, or empty */ 614 /* is fifo receiving already, or empty */
615 if (!(status & FIFOCTL_DIR) 615 if (!(status & FIFOCTL_DIR) ||
616 || (status & FIFOCTL_EMPTY)) 616 (status & FIFOCTL_EMPTY))
617 return 0; 617 return 0;
618 618
619 if (signal_pending(current)) 619 if (signal_pending(current))
620 return -EINTR; 620 return -EINTR;
621 621
622 /* shutting down? */ 622 /* shutting down? */
623 if (!netif_running(stir->netdev) 623 if (!netif_running(stir->netdev) ||
624 || !netif_device_present(stir->netdev)) 624 !netif_device_present(stir->netdev))
625 return -ESHUTDOWN; 625 return -ESHUTDOWN;
626 626
627 /* only waiting for some space */ 627 /* only waiting for some space */
@@ -776,8 +776,8 @@ static int stir_transmit_thread(void *arg)
776 } 776 }
777 777
778 /* nothing to send? start receiving */ 778 /* nothing to send? start receiving */
779 if (!stir->receiving 779 if (!stir->receiving &&
780 && irda_device_txqueue_empty(dev)) { 780 irda_device_txqueue_empty(dev)) {
781 /* Wait otherwise chip gets confused. */ 781 /* Wait otherwise chip gets confused. */
782 if (fifo_txwait(stir, -1)) 782 if (fifo_txwait(stir, -1))
783 break; 783 break;
diff --git a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c
index a5ca71cec028..fddb4efd5453 100644
--- a/drivers/net/irda/via-ircc.c
+++ b/drivers/net/irda/via-ircc.c
@@ -1185,8 +1185,8 @@ F01_E */
1185 * if frame size,data ptr,or skb ptr are wrong ,the get next 1185 * if frame size,data ptr,or skb ptr are wrong ,the get next
1186 * entry. 1186 * entry.
1187 */ 1187 */
1188 if ((skb == NULL) || (skb->data == NULL) 1188 if ((skb == NULL) || (skb->data == NULL) ||
1189 || (self->rx_buff.data == NULL) || (len < 6)) { 1189 (self->rx_buff.data == NULL) || (len < 6)) {
1190 self->netdev->stats.rx_dropped++; 1190 self->netdev->stats.rx_dropped++;
1191 return TRUE; 1191 return TRUE;
1192 } 1192 }
@@ -1284,8 +1284,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1284 self->RetryCount++; 1284 self->RetryCount++;
1285 1285
1286 if ((self->RetryCount >= 1) || 1286 if ((self->RetryCount >= 1) ||
1287 ((st_fifo->pending_bytes + 2048) > self->rx_buff.truesize) 1287 ((st_fifo->pending_bytes + 2048) > self->rx_buff.truesize) ||
1288 || (st_fifo->len >= (MAX_RX_WINDOW))) { 1288 (st_fifo->len >= (MAX_RX_WINDOW))) {
1289 while (st_fifo->len > 0) { //upload frame 1289 while (st_fifo->len > 0) { //upload frame
1290 // Put this entry back in fifo 1290 // Put this entry back in fifo
1291 if (st_fifo->head > MAX_RX_WINDOW) 1291 if (st_fifo->head > MAX_RX_WINDOW)
@@ -1300,8 +1300,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1300 * if frame size, data ptr, or skb ptr are wrong, 1300 * if frame size, data ptr, or skb ptr are wrong,
1301 * then get next entry. 1301 * then get next entry.
1302 */ 1302 */
1303 if ((skb == NULL) || (skb->data == NULL) 1303 if ((skb == NULL) || (skb->data == NULL) ||
1304 || (self->rx_buff.data == NULL) || (len < 6)) { 1304 (self->rx_buff.data == NULL) || (len < 6)) {
1305 self->netdev->stats.rx_dropped++; 1305 self->netdev->stats.rx_dropped++;
1306 continue; 1306 continue;
1307 } 1307 }
@@ -1332,8 +1332,8 @@ static int RxTimerHandler(struct via_ircc_cb *self, int iobase)
1332 * if frame is receive complete at this routine ,then upload 1332 * if frame is receive complete at this routine ,then upload
1333 * frame. 1333 * frame.
1334 */ 1334 */
1335 if ((GetRXStatus(iobase) & 0x10) 1335 if ((GetRXStatus(iobase) & 0x10) &&
1336 && (RxCurCount(iobase, self) != self->RxLastCount)) { 1336 (RxCurCount(iobase, self) != self->RxLastCount)) {
1337 upload_rxdata(self, iobase); 1337 upload_rxdata(self, iobase);
1338 if (irda_device_txqueue_empty(self->netdev)) 1338 if (irda_device_txqueue_empty(self->netdev))
1339 via_ircc_dma_receive(self); 1339 via_ircc_dma_receive(self);
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index 7cfb8b6593c6..bd3c6b5ee76a 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -431,8 +431,8 @@ static struct vlsi_ring *vlsi_alloc_ring(struct pci_dev *pdev, struct ring_descr
431 memset(rd, 0, sizeof(*rd)); 431 memset(rd, 0, sizeof(*rd));
432 rd->hw = hwmap + i; 432 rd->hw = hwmap + i;
433 rd->buf = kmalloc(len, GFP_KERNEL|GFP_DMA); 433 rd->buf = kmalloc(len, GFP_KERNEL|GFP_DMA);
434 if (rd->buf == NULL 434 if (rd->buf == NULL ||
435 || !(busaddr = pci_map_single(pdev, rd->buf, len, dir))) { 435 !(busaddr = pci_map_single(pdev, rd->buf, len, dir))) {
436 if (rd->buf) { 436 if (rd->buf) {
437 IRDA_ERROR("%s: failed to create PCI-MAP for %p", 437 IRDA_ERROR("%s: failed to create PCI-MAP for %p",
438 __func__, rd->buf); 438 __func__, rd->buf);
@@ -955,8 +955,8 @@ static netdev_tx_t vlsi_hard_start_xmit(struct sk_buff *skb,
955 } 955 }
956 for(;;) { 956 for(;;) {
957 do_gettimeofday(&now); 957 do_gettimeofday(&now);
958 if (now.tv_sec > ready.tv_sec 958 if (now.tv_sec > ready.tv_sec ||
959 || (now.tv_sec==ready.tv_sec && now.tv_usec>=ready.tv_usec)) 959 (now.tv_sec==ready.tv_sec && now.tv_usec>=ready.tv_usec))
960 break; 960 break;
961 udelay(100); 961 udelay(100);
962 /* must not sleep here - called under netif_tx_lock! */ 962 /* must not sleep here - called under netif_tx_lock! */
@@ -1594,8 +1594,8 @@ static int vlsi_irda_init(struct net_device *ndev)
1594 * see include file for details why we need these 2 masks, in this order! 1594 * see include file for details why we need these 2 masks, in this order!
1595 */ 1595 */
1596 1596
1597 if (pci_set_dma_mask(pdev,DMA_MASK_USED_BY_HW) 1597 if (pci_set_dma_mask(pdev,DMA_MASK_USED_BY_HW) ||
1598 || pci_set_dma_mask(pdev,DMA_MASK_MSTRPAGE)) { 1598 pci_set_dma_mask(pdev,DMA_MASK_MSTRPAGE)) {
1599 IRDA_ERROR("%s: aborting due to PCI BM-DMA address limitations\n", __func__); 1599 IRDA_ERROR("%s: aborting due to PCI BM-DMA address limitations\n", __func__);
1600 return -1; 1600 return -1;
1601 } 1601 }
@@ -1641,8 +1641,8 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1641 IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", 1641 IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n",
1642 drivername, pci_name(pdev)); 1642 drivername, pci_name(pdev));
1643 1643
1644 if ( !pci_resource_start(pdev,0) 1644 if ( !pci_resource_start(pdev,0) ||
1645 || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { 1645 !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) {
1646 IRDA_ERROR("%s: bar 0 invalid", __func__); 1646 IRDA_ERROR("%s: bar 0 invalid", __func__);
1647 goto out_disable; 1647 goto out_disable;
1648 } 1648 }