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

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>

authored by

Al Viro and committed by
David S. Miller
ee41a82f cc2d6596

+15 -15
+3 -3
drivers/net/amd8111e.c
··· 1404 1404 static int amd8111e_tx_queue_avail(struct amd8111e_priv* lp ) 1405 1405 { 1406 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 1408 return -1; 1409 1409 else 1410 1410 return 0; ··· 1441 1441 lp->tx_dma_addr[tx_index] = 1442 1442 pci_map_single(lp->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE); 1443 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 1446 /* Set FCS and LTINT bits */ 1447 1447 wmb(); ··· 1998 1998 spin_lock_init(&lp->lock); 1999 1999 2000 2000 lp->mmio = ioremap(reg_addr, reg_len); 2001 - if (lp->mmio == 0) { 2001 + if (!lp->mmio) { 2002 2002 printk(KERN_ERR "amd8111e: Cannot map device registers, " 2003 2003 "exiting\n"); 2004 2004 err = -ENOMEM;
+12 -12
drivers/net/amd8111e.h
··· 655 655 656 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 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 686 struct amd8111e_link_config{