diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-08-22 21:37:46 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:58 -0400 |
commit | ee41a82fa362449e608c4dab7df261058ffd52c0 (patch) | |
tree | 9345eae60266edba9e694eb2aec86b080238614f | |
parent | cc2d6596ca79667830a90ca177ba53b0d83262de (diff) |
amd8111e: trivial endianness annotations, NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/amd8111e.c | 6 | ||||
-rw-r--r-- | drivers/net/amd8111e.h | 24 |
2 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 73f40a45441a..babe0de2ce44 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -1404,7 +1404,7 @@ This function checks if there is any transmit descriptors available to queue mo | |||
1404 | static int amd8111e_tx_queue_avail(struct amd8111e_priv* lp ) | 1404 | static int amd8111e_tx_queue_avail(struct amd8111e_priv* lp ) |
1405 | { | 1405 | { |
1406 | int tx_index = lp->tx_idx & TX_BUFF_MOD_MASK; | 1406 | int tx_index = lp->tx_idx & TX_BUFF_MOD_MASK; |
1407 | if(lp->tx_skbuff[tx_index] != 0) | 1407 | if (lp->tx_skbuff[tx_index]) |
1408 | return -1; | 1408 | return -1; |
1409 | else | 1409 | else |
1410 | return 0; | 1410 | return 0; |
@@ -1441,7 +1441,7 @@ static int amd8111e_start_xmit(struct sk_buff *skb, struct net_device * dev) | |||
1441 | lp->tx_dma_addr[tx_index] = | 1441 | lp->tx_dma_addr[tx_index] = |
1442 | pci_map_single(lp->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE); | 1442 | pci_map_single(lp->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE); |
1443 | lp->tx_ring[tx_index].buff_phy_addr = | 1443 | lp->tx_ring[tx_index].buff_phy_addr = |
1444 | (u32) cpu_to_le32(lp->tx_dma_addr[tx_index]); | 1444 | cpu_to_le32(lp->tx_dma_addr[tx_index]); |
1445 | 1445 | ||
1446 | /* Set FCS and LTINT bits */ | 1446 | /* Set FCS and LTINT bits */ |
1447 | wmb(); | 1447 | wmb(); |
@@ -1998,7 +1998,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev, | |||
1998 | spin_lock_init(&lp->lock); | 1998 | spin_lock_init(&lp->lock); |
1999 | 1999 | ||
2000 | lp->mmio = ioremap(reg_addr, reg_len); | 2000 | lp->mmio = ioremap(reg_addr, reg_len); |
2001 | if (lp->mmio == 0) { | 2001 | if (!lp->mmio) { |
2002 | printk(KERN_ERR "amd8111e: Cannot map device registers, " | 2002 | printk(KERN_ERR "amd8111e: Cannot map device registers, " |
2003 | "exiting\n"); | 2003 | "exiting\n"); |
2004 | err = -ENOMEM; | 2004 | err = -ENOMEM; |
diff --git a/drivers/net/amd8111e.h b/drivers/net/amd8111e.h index 612e653610e1..28c60a71ed50 100644 --- a/drivers/net/amd8111e.h +++ b/drivers/net/amd8111e.h | |||
@@ -655,32 +655,32 @@ typedef enum { | |||
655 | 655 | ||
656 | struct amd8111e_tx_dr{ | 656 | struct amd8111e_tx_dr{ |
657 | 657 | ||
658 | u16 buff_count; /* Size of the buffer pointed by this descriptor */ | 658 | __le16 buff_count; /* Size of the buffer pointed by this descriptor */ |
659 | 659 | ||
660 | u16 tx_flags; | 660 | __le16 tx_flags; |
661 | 661 | ||
662 | u16 tag_ctrl_info; | 662 | __le16 tag_ctrl_info; |
663 | 663 | ||
664 | u16 tag_ctrl_cmd; | 664 | __le16 tag_ctrl_cmd; |
665 | 665 | ||
666 | u32 buff_phy_addr; | 666 | __le32 buff_phy_addr; |
667 | 667 | ||
668 | u32 reserved; | 668 | __le32 reserved; |
669 | }; | 669 | }; |
670 | 670 | ||
671 | struct amd8111e_rx_dr{ | 671 | struct amd8111e_rx_dr{ |
672 | 672 | ||
673 | u32 reserved; | 673 | __le32 reserved; |
674 | 674 | ||
675 | u16 msg_count; /* Received message len */ | 675 | __le16 msg_count; /* Received message len */ |
676 | 676 | ||
677 | u16 tag_ctrl_info; | 677 | __le16 tag_ctrl_info; |
678 | 678 | ||
679 | u16 buff_count; /* Len of the buffer pointed by descriptor. */ | 679 | __le16 buff_count; /* Len of the buffer pointed by descriptor. */ |
680 | 680 | ||
681 | u16 rx_flags; | 681 | __le16 rx_flags; |
682 | 682 | ||
683 | u32 buff_phy_addr; | 683 | __le32 buff_phy_addr; |
684 | 684 | ||
685 | }; | 685 | }; |
686 | struct amd8111e_link_config{ | 686 | struct amd8111e_link_config{ |