···14041404static int amd8111e_tx_queue_avail(struct amd8111e_priv* lp )14051405{14061406 int tx_index = lp->tx_idx & TX_BUFF_MOD_MASK;14071407- if(lp->tx_skbuff[tx_index] != 0)14071407+ if (lp->tx_skbuff[tx_index])14081408 return -1;14091409 else14101410 return 0;···14411441 lp->tx_dma_addr[tx_index] =14421442 pci_map_single(lp->pci_dev, skb->data, skb->len, PCI_DMA_TODEVICE);14431443 lp->tx_ring[tx_index].buff_phy_addr =14441444- (u32) cpu_to_le32(lp->tx_dma_addr[tx_index]);14441444+ cpu_to_le32(lp->tx_dma_addr[tx_index]);1445144514461446 /* Set FCS and LTINT bits */14471447 wmb();···19981998 spin_lock_init(&lp->lock);1999199920002000 lp->mmio = ioremap(reg_addr, reg_len);20012001- if (lp->mmio == 0) {20012001+ if (!lp->mmio) {20022002 printk(KERN_ERR "amd8111e: Cannot map device registers, "20032003 "exiting\n");20042004 err = -ENOMEM;
+12-12
drivers/net/amd8111e.h
···655655656656struct amd8111e_tx_dr{657657658658- u16 buff_count; /* Size of the buffer pointed by this descriptor */658658+ __le16 buff_count; /* Size of the buffer pointed by this descriptor */659659660660- u16 tx_flags;660660+ __le16 tx_flags;661661662662- u16 tag_ctrl_info;662662+ __le16 tag_ctrl_info;663663664664- u16 tag_ctrl_cmd;664664+ __le16 tag_ctrl_cmd;665665666666- u32 buff_phy_addr;666666+ __le32 buff_phy_addr;667667668668- u32 reserved;668668+ __le32 reserved;669669};670670671671struct amd8111e_rx_dr{672672673673- u32 reserved;673673+ __le32 reserved;674674675675- u16 msg_count; /* Received message len */675675+ __le16 msg_count; /* Received message len */676676677677- u16 tag_ctrl_info;677677+ __le16 tag_ctrl_info;678678679679- u16 buff_count; /* Len of the buffer pointed by descriptor. */679679+ __le16 buff_count; /* Len of the buffer pointed by descriptor. */680680681681- u16 rx_flags;681681+ __le16 rx_flags;682682683683- u32 buff_phy_addr;683683+ __le32 buff_phy_addr;684684685685};686686struct amd8111e_link_config{