diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-08-22 21:34:46 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:57 -0400 |
commit | cc2d6596ca79667830a90ca177ba53b0d83262de (patch) | |
tree | c804e4b6f91200e4e5aced8a232d559e718709ec /drivers/net | |
parent | cf9830195a3f35b1248425b69a01ee43f5b68221 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/3c59x.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 93eb78425d6d..8d3893da06f5 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -538,10 +538,10 @@ enum MasterCtrl { | |||
538 | #define LAST_FRAG 0x80000000 /* Last Addr/Len pair in descriptor. */ | 538 | #define LAST_FRAG 0x80000000 /* Last Addr/Len pair in descriptor. */ |
539 | #define DN_COMPLETE 0x00010000 /* This packet has been downloaded */ | 539 | #define DN_COMPLETE 0x00010000 /* This packet has been downloaded */ |
540 | struct boom_rx_desc { | 540 | struct boom_rx_desc { |
541 | u32 next; /* Last entry points to 0. */ | 541 | __le32 next; /* Last entry points to 0. */ |
542 | s32 status; | 542 | __le32 status; |
543 | u32 addr; /* Up to 63 addr/len pairs possible. */ | 543 | __le32 addr; /* Up to 63 addr/len pairs possible. */ |
544 | s32 length; /* Set LAST_FRAG to indicate last pair. */ | 544 | __le32 length; /* Set LAST_FRAG to indicate last pair. */ |
545 | }; | 545 | }; |
546 | /* Values for the Rx status entry. */ | 546 | /* Values for the Rx status entry. */ |
547 | enum rx_desc_status { | 547 | enum rx_desc_status { |
@@ -558,16 +558,16 @@ enum rx_desc_status { | |||
558 | #endif | 558 | #endif |
559 | 559 | ||
560 | struct boom_tx_desc { | 560 | struct boom_tx_desc { |
561 | u32 next; /* Last entry points to 0. */ | 561 | __le32 next; /* Last entry points to 0. */ |
562 | s32 status; /* bits 0:12 length, others see below. */ | 562 | __le32 status; /* bits 0:12 length, others see below. */ |
563 | #if DO_ZEROCOPY | 563 | #if DO_ZEROCOPY |
564 | struct { | 564 | struct { |
565 | u32 addr; | 565 | __le32 addr; |
566 | s32 length; | 566 | __le32 length; |
567 | } frag[1+MAX_SKB_FRAGS]; | 567 | } frag[1+MAX_SKB_FRAGS]; |
568 | #else | 568 | #else |
569 | u32 addr; | 569 | __le32 addr; |
570 | s32 length; | 570 | __le32 length; |
571 | #endif | 571 | #endif |
572 | }; | 572 | }; |
573 | 573 | ||
@@ -1131,7 +1131,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1131 | + sizeof(struct boom_tx_desc) * TX_RING_SIZE, | 1131 | + sizeof(struct boom_tx_desc) * TX_RING_SIZE, |
1132 | &vp->rx_ring_dma); | 1132 | &vp->rx_ring_dma); |
1133 | retval = -ENOMEM; | 1133 | retval = -ENOMEM; |
1134 | if (vp->rx_ring == 0) | 1134 | if (!vp->rx_ring) |
1135 | goto free_region; | 1135 | goto free_region; |
1136 | 1136 | ||
1137 | vp->tx_ring = (struct boom_tx_desc *)(vp->rx_ring + RX_RING_SIZE); | 1137 | vp->tx_ring = (struct boom_tx_desc *)(vp->rx_ring + RX_RING_SIZE); |
@@ -1204,7 +1204,7 @@ static int __devinit vortex_probe1(struct device *gendev, | |||
1204 | if ((checksum != 0x00) && !(vci->drv_flags & IS_TORNADO)) | 1204 | if ((checksum != 0x00) && !(vci->drv_flags & IS_TORNADO)) |
1205 | printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); | 1205 | printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); |
1206 | for (i = 0; i < 3; i++) | 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 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); | 1208 | memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); |
1209 | if (print_info) | 1209 | if (print_info) |
1210 | printk(" %s", print_mac(mac, dev->dev_addr)); | 1210 | printk(" %s", print_mac(mac, dev->dev_addr)); |
@@ -2500,7 +2500,7 @@ boomerang_rx(struct net_device *dev) | |||
2500 | 2500 | ||
2501 | /* Check if the packet is long enough to just accept without | 2501 | /* Check if the packet is long enough to just accept without |
2502 | copying to a properly sized skbuff. */ | 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 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ | 2504 | skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ |
2505 | pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); | 2505 | pci_dma_sync_single_for_cpu(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); |
2506 | /* 'skb_put()' points to the start of sk_buff data area. */ | 2506 | /* 'skb_put()' points to the start of sk_buff data area. */ |
@@ -2914,7 +2914,7 @@ static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
2914 | struct vortex_private *vp = netdev_priv(dev); | 2914 | struct vortex_private *vp = netdev_priv(dev); |
2915 | void __iomem *ioaddr = vp->ioaddr; | 2915 | void __iomem *ioaddr = vp->ioaddr; |
2916 | unsigned long flags; | 2916 | unsigned long flags; |
2917 | int state = 0; | 2917 | pci_power_t state = 0; |
2918 | 2918 | ||
2919 | if(VORTEX_PCI(vp)) | 2919 | if(VORTEX_PCI(vp)) |
2920 | state = VORTEX_PCI(vp)->current_state; | 2920 | state = VORTEX_PCI(vp)->current_state; |