Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

3c59x: trivial endianness annotations, NULL noise removal

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>

authored by

Al Viro and committed by
David S. Miller
cc2d6596 cf983019

+14 -14
+14 -14
drivers/net/3c59x.c
··· 538 538 #define LAST_FRAG 0x80000000 /* Last Addr/Len pair in descriptor. */ 539 539 #define DN_COMPLETE 0x00010000 /* This packet has been downloaded */ 540 540 struct boom_rx_desc { 541 - u32 next; /* Last entry points to 0. */ 542 - s32 status; 543 - u32 addr; /* Up to 63 addr/len pairs possible. */ 544 - s32 length; /* Set LAST_FRAG to indicate last pair. */ 541 + __le32 next; /* Last entry points to 0. */ 542 + __le32 status; 543 + __le32 addr; /* Up to 63 addr/len pairs possible. */ 544 + __le32 length; /* Set LAST_FRAG to indicate last pair. */ 545 545 }; 546 546 /* Values for the Rx status entry. */ 547 547 enum rx_desc_status { ··· 558 558 #endif 559 559 560 560 struct boom_tx_desc { 561 - u32 next; /* Last entry points to 0. */ 562 - s32 status; /* bits 0:12 length, others see below. */ 561 + __le32 next; /* Last entry points to 0. */ 562 + __le32 status; /* bits 0:12 length, others see below. */ 563 563 #if DO_ZEROCOPY 564 564 struct { 565 - u32 addr; 566 - s32 length; 565 + __le32 addr; 566 + __le32 length; 567 567 } frag[1+MAX_SKB_FRAGS]; 568 568 #else 569 - u32 addr; 570 - s32 length; 569 + __le32 addr; 570 + __le32 length; 571 571 #endif 572 572 }; 573 573 ··· 1131 1131 + sizeof(struct boom_tx_desc) * TX_RING_SIZE, 1132 1132 &vp->rx_ring_dma); 1133 1133 retval = -ENOMEM; 1134 - if (vp->rx_ring == 0) 1134 + if (!vp->rx_ring) 1135 1135 goto free_region; 1136 1136 1137 1137 vp->tx_ring = (struct boom_tx_desc *)(vp->rx_ring + RX_RING_SIZE); ··· 1204 1204 if ((checksum != 0x00) && !(vci->drv_flags & IS_TORNADO)) 1205 1205 printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); 1206 1206 for (i = 0; i < 3; i++) 1207 - ((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); 1207 + ((__be16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); 1208 1208 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 1209 1209 if (print_info) 1210 1210 printk(" %s", print_mac(mac, dev->dev_addr)); ··· 2500 2500 2501 2501 /* Check if the packet is long enough to just accept without 2502 2502 copying to a properly sized skbuff. */ 2503 - if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != 0) { 2503 + if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 2504 2504 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 2505 2505 pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); 2506 2506 /* 'skb_put()' points to the start of sk_buff data area. */ ··· 2914 2914 struct vortex_private *vp = netdev_priv(dev); 2915 2915 void __iomem *ioaddr = vp->ioaddr; 2916 2916 unsigned long flags; 2917 - int state = 0; 2917 + pci_power_t state = 0; 2918 2918 2919 2919 if(VORTEX_PCI(vp)) 2920 2920 state = VORTEX_PCI(vp)->current_state;