aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/8390/apne.c2
-rw-r--r--drivers/net/ethernet/aeroflex/greth.c8
-rw-r--r--drivers/net/ethernet/amd/declance.c4
-rw-r--r--drivers/net/ethernet/apple/macmace.c2
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_hw.c6
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c9
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c2
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_main.c35
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl1.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c3
-rw-r--r--drivers/net/ethernet/broadcom/cnic.c12
-rw-r--r--drivers/net/ethernet/brocade/bna/cna_fwimg.c4
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/sge.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/sge.c5
-rw-r--r--drivers/net/ethernet/dec/tulip/de4x5.c2
-rw-r--r--drivers/net/ethernet/freescale/ucc_geth.c2
-rw-r--r--drivers/net/ethernet/hp/hp100.c6
-rw-r--r--drivers/net/ethernet/i825xx/lp486e.c8
-rw-r--r--drivers/net/ethernet/i825xx/sun3_82586.c4
-rw-r--r--drivers/net/ethernet/marvell/mv643xx_eth.c4
-rw-r--r--drivers/net/ethernet/marvell/pxa168_eth.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/resource_tracker.c4
-rw-r--r--drivers/net/ethernet/neterion/s2io.c14
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-config.c8
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-config.h2
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-main.c8
-rw-r--r--drivers/net/ethernet/neterion/vxge/vxge-traffic.c5
-rw-r--r--drivers/net/ethernet/sgi/ioc3-eth.c4
-rw-r--r--drivers/net/ethernet/smsc/smsc9420.c3
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c2
-rw-r--r--drivers/net/ethernet/sun/sunqe.c2
-rw-r--r--drivers/net/ethernet/via/via-velocity.c2
34 files changed, 87 insertions, 97 deletions
diff --git a/drivers/net/ethernet/8390/apne.c b/drivers/net/ethernet/8390/apne.c
index 923959275a82..912ed7a5f33a 100644
--- a/drivers/net/ethernet/8390/apne.c
+++ b/drivers/net/ethernet/8390/apne.c
@@ -454,7 +454,7 @@ apne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int rin
454 buf[count-1] = inb(NE_BASE + NE_DATAPORT); 454 buf[count-1] = inb(NE_BASE + NE_DATAPORT);
455 } 455 }
456 } else { 456 } else {
457 ptrc = (char*)buf; 457 ptrc = buf;
458 for (cnt = 0; cnt < count; cnt++) 458 for (cnt = 0; cnt < count; cnt++)
459 *ptrc++ = inb(NE_BASE + NE_DATAPORT); 459 *ptrc++ = inb(NE_BASE + NE_DATAPORT);
460 } 460 }
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index 348501178089..9c77c736f171 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -1014,7 +1014,7 @@ static int greth_set_mac_add(struct net_device *dev, void *p)
1014 struct greth_regs *regs; 1014 struct greth_regs *regs;
1015 1015
1016 greth = netdev_priv(dev); 1016 greth = netdev_priv(dev);
1017 regs = (struct greth_regs *) greth->regs; 1017 regs = greth->regs;
1018 1018
1019 if (!is_valid_ether_addr(addr->sa_data)) 1019 if (!is_valid_ether_addr(addr->sa_data))
1020 return -EADDRNOTAVAIL; 1020 return -EADDRNOTAVAIL;
@@ -1036,7 +1036,7 @@ static void greth_set_hash_filter(struct net_device *dev)
1036{ 1036{
1037 struct netdev_hw_addr *ha; 1037 struct netdev_hw_addr *ha;
1038 struct greth_private *greth = netdev_priv(dev); 1038 struct greth_private *greth = netdev_priv(dev);
1039 struct greth_regs *regs = (struct greth_regs *) greth->regs; 1039 struct greth_regs *regs = greth->regs;
1040 u32 mc_filter[2]; 1040 u32 mc_filter[2];
1041 unsigned int bitnr; 1041 unsigned int bitnr;
1042 1042
@@ -1055,7 +1055,7 @@ static void greth_set_multicast_list(struct net_device *dev)
1055{ 1055{
1056 int cfg; 1056 int cfg;
1057 struct greth_private *greth = netdev_priv(dev); 1057 struct greth_private *greth = netdev_priv(dev);
1058 struct greth_regs *regs = (struct greth_regs *) greth->regs; 1058 struct greth_regs *regs = greth->regs;
1059 1059
1060 cfg = GRETH_REGLOAD(regs->control); 1060 cfg = GRETH_REGLOAD(regs->control);
1061 if (dev->flags & IFF_PROMISC) 1061 if (dev->flags & IFF_PROMISC)
@@ -1414,7 +1414,7 @@ static int __devinit greth_of_probe(struct platform_device *ofdev)
1414 goto error1; 1414 goto error1;
1415 } 1415 }
1416 1416
1417 regs = (struct greth_regs *) greth->regs; 1417 regs = greth->regs;
1418 greth->irq = ofdev->archdata.irqs[0]; 1418 greth->irq = ofdev->archdata.irqs[0];
1419 1419
1420 dev_set_drvdata(greth->dev, dev); 1420 dev_set_drvdata(greth->dev, dev);
diff --git a/drivers/net/ethernet/amd/declance.c b/drivers/net/ethernet/amd/declance.c
index 75299f500ee5..7203b522f234 100644
--- a/drivers/net/ethernet/amd/declance.c
+++ b/drivers/net/ethernet/amd/declance.c
@@ -623,7 +623,7 @@ static int lance_rx(struct net_device *dev)
623 skb_put(skb, len); /* make room */ 623 skb_put(skb, len); /* make room */
624 624
625 cp_from_buf(lp->type, skb->data, 625 cp_from_buf(lp->type, skb->data,
626 (char *)lp->rx_buf_ptr_cpu[entry], len); 626 lp->rx_buf_ptr_cpu[entry], len);
627 627
628 skb->protocol = eth_type_trans(skb, dev); 628 skb->protocol = eth_type_trans(skb, dev);
629 netif_rx(skb); 629 netif_rx(skb);
@@ -919,7 +919,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
919 *lib_ptr(ib, btx_ring[entry].length, lp->type) = (-len); 919 *lib_ptr(ib, btx_ring[entry].length, lp->type) = (-len);
920 *lib_ptr(ib, btx_ring[entry].misc, lp->type) = 0; 920 *lib_ptr(ib, btx_ring[entry].misc, lp->type) = 0;
921 921
922 cp_to_buf(lp->type, (char *)lp->tx_buf_ptr_cpu[entry], skb->data, len); 922 cp_to_buf(lp->type, lp->tx_buf_ptr_cpu[entry], skb->data, len);
923 923
924 /* Now, give the packet to the lance */ 924 /* Now, give the packet to the lance */
925 *lib_ptr(ib, btx_ring[entry].tmd1, lp->type) = 925 *lib_ptr(ib, btx_ring[entry].tmd1, lp->type) =
diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index ab7ff8645ab1..a92ddee7f665 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -228,7 +228,7 @@ static int __devinit mace_probe(struct platform_device *pdev)
228 * bits are reversed. 228 * bits are reversed.
229 */ 229 */
230 230
231 addr = (void *)MACE_PROM; 231 addr = MACE_PROM;
232 232
233 for (j = 0; j < 6; ++j) { 233 for (j = 0; j < 6; ++j) {
234 u8 v = bitrev8(addr[j<<4]); 234 u8 v = bitrev8(addr[j<<4]);
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
index ff9c73859d45..801f0126512d 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c
@@ -602,7 +602,7 @@ int atl1c_phy_reset(struct atl1c_hw *hw)
602 602
603int atl1c_phy_init(struct atl1c_hw *hw) 603int atl1c_phy_init(struct atl1c_hw *hw)
604{ 604{
605 struct atl1c_adapter *adapter = (struct atl1c_adapter *)hw->adapter; 605 struct atl1c_adapter *adapter = hw->adapter;
606 struct pci_dev *pdev = adapter->pdev; 606 struct pci_dev *pdev = adapter->pdev;
607 int ret_val; 607 int ret_val;
608 u16 mii_bmcr_data = BMCR_RESET; 608 u16 mii_bmcr_data = BMCR_RESET;
@@ -696,7 +696,7 @@ int atl1c_get_speed_and_duplex(struct atl1c_hw *hw, u16 *speed, u16 *duplex)
696/* select one link mode to get lower power consumption */ 696/* select one link mode to get lower power consumption */
697int atl1c_phy_to_ps_link(struct atl1c_hw *hw) 697int atl1c_phy_to_ps_link(struct atl1c_hw *hw)
698{ 698{
699 struct atl1c_adapter *adapter = (struct atl1c_adapter *)hw->adapter; 699 struct atl1c_adapter *adapter = hw->adapter;
700 struct pci_dev *pdev = adapter->pdev; 700 struct pci_dev *pdev = adapter->pdev;
701 int ret = 0; 701 int ret = 0;
702 u16 autoneg_advertised = ADVERTISED_10baseT_Half; 702 u16 autoneg_advertised = ADVERTISED_10baseT_Half;
@@ -768,7 +768,7 @@ int atl1c_restart_autoneg(struct atl1c_hw *hw)
768 768
769int atl1c_power_saving(struct atl1c_hw *hw, u32 wufc) 769int atl1c_power_saving(struct atl1c_hw *hw, u32 wufc)
770{ 770{
771 struct atl1c_adapter *adapter = (struct atl1c_adapter *)hw->adapter; 771 struct atl1c_adapter *adapter = hw->adapter;
772 struct pci_dev *pdev = adapter->pdev; 772 struct pci_dev *pdev = adapter->pdev;
773 u32 master_ctrl, mac_ctrl, phy_ctrl; 773 u32 master_ctrl, mac_ctrl, phy_ctrl;
774 u32 wol_ctrl, speed; 774 u32 wol_ctrl, speed;
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 9cc15701101b..85717cb306d1 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -989,12 +989,12 @@ static int atl1c_setup_ring_resources(struct atl1c_adapter *adapter)
989 } 989 }
990 for (i = 0; i < AT_MAX_TRANSMIT_QUEUE; i++) { 990 for (i = 0; i < AT_MAX_TRANSMIT_QUEUE; i++) {
991 tpd_ring[i].buffer_info = 991 tpd_ring[i].buffer_info =
992 (struct atl1c_buffer *) (tpd_ring->buffer_info + count); 992 (tpd_ring->buffer_info + count);
993 count += tpd_ring[i].count; 993 count += tpd_ring[i].count;
994 } 994 }
995 995
996 rfd_ring->buffer_info = 996 rfd_ring->buffer_info =
997 (struct atl1c_buffer *) (tpd_ring->buffer_info + count); 997 (tpd_ring->buffer_info + count);
998 count += rfd_ring->count; 998 count += rfd_ring->count;
999 rx_desc_count += rfd_ring->count; 999 rx_desc_count += rfd_ring->count;
1000 1000
@@ -1227,7 +1227,7 @@ static void atl1c_start_mac(struct atl1c_adapter *adapter)
1227 */ 1227 */
1228static int atl1c_reset_mac(struct atl1c_hw *hw) 1228static int atl1c_reset_mac(struct atl1c_hw *hw)
1229{ 1229{
1230 struct atl1c_adapter *adapter = (struct atl1c_adapter *)hw->adapter; 1230 struct atl1c_adapter *adapter = hw->adapter;
1231 struct pci_dev *pdev = adapter->pdev; 1231 struct pci_dev *pdev = adapter->pdev;
1232 u32 ctrl_data = 0; 1232 u32 ctrl_data = 0;
1233 1233
@@ -1531,8 +1531,7 @@ static inline void atl1c_clear_phy_int(struct atl1c_adapter *adapter)
1531static bool atl1c_clean_tx_irq(struct atl1c_adapter *adapter, 1531static bool atl1c_clean_tx_irq(struct atl1c_adapter *adapter,
1532 enum atl1c_trans_queue type) 1532 enum atl1c_trans_queue type)
1533{ 1533{
1534 struct atl1c_tpd_ring *tpd_ring = (struct atl1c_tpd_ring *) 1534 struct atl1c_tpd_ring *tpd_ring = &adapter->tpd_ring[type];
1535 &adapter->tpd_ring[type];
1536 struct atl1c_buffer *buffer_info; 1535 struct atl1c_buffer *buffer_info;
1537 struct pci_dev *pdev = adapter->pdev; 1536 struct pci_dev *pdev = adapter->pdev;
1538 u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean); 1537 u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean);
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c
index 6e61f9f9ebb5..82b23861bf55 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_ethtool.c
@@ -268,7 +268,7 @@ static int atl1e_set_eeprom(struct net_device *netdev,
268 if (eeprom_buff == NULL) 268 if (eeprom_buff == NULL)
269 return -ENOMEM; 269 return -ENOMEM;
270 270
271 ptr = (u32 *)eeprom_buff; 271 ptr = eeprom_buff;
272 272
273 if (eeprom->offset & 3) { 273 if (eeprom->offset & 3) {
274 /* need read/modify/write of first changed EEPROM word */ 274 /* need read/modify/write of first changed EEPROM word */
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index 1220e511ced6..0aed82e1bb3e 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -641,8 +641,7 @@ static int __devinit atl1e_sw_init(struct atl1e_adapter *adapter)
641 */ 641 */
642static void atl1e_clean_tx_ring(struct atl1e_adapter *adapter) 642static void atl1e_clean_tx_ring(struct atl1e_adapter *adapter)
643{ 643{
644 struct atl1e_tx_ring *tx_ring = (struct atl1e_tx_ring *) 644 struct atl1e_tx_ring *tx_ring = &adapter->tx_ring;
645 &adapter->tx_ring;
646 struct atl1e_tx_buffer *tx_buffer = NULL; 645 struct atl1e_tx_buffer *tx_buffer = NULL;
647 struct pci_dev *pdev = adapter->pdev; 646 struct pci_dev *pdev = adapter->pdev;
648 u16 index, ring_count; 647 u16 index, ring_count;
@@ -686,7 +685,7 @@ static void atl1e_clean_tx_ring(struct atl1e_adapter *adapter)
686static void atl1e_clean_rx_ring(struct atl1e_adapter *adapter) 685static void atl1e_clean_rx_ring(struct atl1e_adapter *adapter)
687{ 686{
688 struct atl1e_rx_ring *rx_ring = 687 struct atl1e_rx_ring *rx_ring =
689 (struct atl1e_rx_ring *)&adapter->rx_ring; 688 &adapter->rx_ring;
690 struct atl1e_rx_page_desc *rx_page_desc = rx_ring->rx_page_desc; 689 struct atl1e_rx_page_desc *rx_page_desc = rx_ring->rx_page_desc;
691 u16 i, j; 690 u16 i, j;
692 691
@@ -884,14 +883,12 @@ failed:
884 return err; 883 return err;
885} 884}
886 885
887static inline void atl1e_configure_des_ring(const struct atl1e_adapter *adapter) 886static inline void atl1e_configure_des_ring(struct atl1e_adapter *adapter)
888{ 887{
889 888
890 struct atl1e_hw *hw = (struct atl1e_hw *)&adapter->hw; 889 struct atl1e_hw *hw = &adapter->hw;
891 struct atl1e_rx_ring *rx_ring = 890 struct atl1e_rx_ring *rx_ring = &adapter->rx_ring;
892 (struct atl1e_rx_ring *)&adapter->rx_ring; 891 struct atl1e_tx_ring *tx_ring = &adapter->tx_ring;
893 struct atl1e_tx_ring *tx_ring =
894 (struct atl1e_tx_ring *)&adapter->tx_ring;
895 struct atl1e_rx_page_desc *rx_page_desc = NULL; 892 struct atl1e_rx_page_desc *rx_page_desc = NULL;
896 int i, j; 893 int i, j;
897 894
@@ -932,7 +929,7 @@ static inline void atl1e_configure_des_ring(const struct atl1e_adapter *adapter)
932 929
933static inline void atl1e_configure_tx(struct atl1e_adapter *adapter) 930static inline void atl1e_configure_tx(struct atl1e_adapter *adapter)
934{ 931{
935 struct atl1e_hw *hw = (struct atl1e_hw *)&adapter->hw; 932 struct atl1e_hw *hw = &adapter->hw;
936 u32 dev_ctrl_data = 0; 933 u32 dev_ctrl_data = 0;
937 u32 max_pay_load = 0; 934 u32 max_pay_load = 0;
938 u32 jumbo_thresh = 0; 935 u32 jumbo_thresh = 0;
@@ -975,7 +972,7 @@ static inline void atl1e_configure_tx(struct atl1e_adapter *adapter)
975 972
976static inline void atl1e_configure_rx(struct atl1e_adapter *adapter) 973static inline void atl1e_configure_rx(struct atl1e_adapter *adapter)
977{ 974{
978 struct atl1e_hw *hw = (struct atl1e_hw *)&adapter->hw; 975 struct atl1e_hw *hw = &adapter->hw;
979 u32 rxf_len = 0; 976 u32 rxf_len = 0;
980 u32 rxf_low = 0; 977 u32 rxf_low = 0;
981 u32 rxf_high = 0; 978 u32 rxf_high = 0;
@@ -1224,8 +1221,7 @@ static inline void atl1e_clear_phy_int(struct atl1e_adapter *adapter)
1224 1221
1225static bool atl1e_clean_tx_irq(struct atl1e_adapter *adapter) 1222static bool atl1e_clean_tx_irq(struct atl1e_adapter *adapter)
1226{ 1223{
1227 struct atl1e_tx_ring *tx_ring = (struct atl1e_tx_ring *) 1224 struct atl1e_tx_ring *tx_ring = &adapter->tx_ring;
1228 &adapter->tx_ring;
1229 struct atl1e_tx_buffer *tx_buffer = NULL; 1225 struct atl1e_tx_buffer *tx_buffer = NULL;
1230 u16 hw_next_to_clean = AT_READ_REGW(&adapter->hw, REG_TPD_CONS_IDX); 1226 u16 hw_next_to_clean = AT_READ_REGW(&adapter->hw, REG_TPD_CONS_IDX);
1231 u16 next_to_clean = atomic_read(&tx_ring->next_to_clean); 1227 u16 next_to_clean = atomic_read(&tx_ring->next_to_clean);
@@ -1384,15 +1380,14 @@ static struct atl1e_rx_page *atl1e_get_rx_page(struct atl1e_adapter *adapter,
1384 (struct atl1e_rx_page_desc *) adapter->rx_ring.rx_page_desc; 1380 (struct atl1e_rx_page_desc *) adapter->rx_ring.rx_page_desc;
1385 u8 rx_using = rx_page_desc[que].rx_using; 1381 u8 rx_using = rx_page_desc[que].rx_using;
1386 1382
1387 return (struct atl1e_rx_page *)&(rx_page_desc[que].rx_page[rx_using]); 1383 return &(rx_page_desc[que].rx_page[rx_using]);
1388} 1384}
1389 1385
1390static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que, 1386static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que,
1391 int *work_done, int work_to_do) 1387 int *work_done, int work_to_do)
1392{ 1388{
1393 struct net_device *netdev = adapter->netdev; 1389 struct net_device *netdev = adapter->netdev;
1394 struct atl1e_rx_ring *rx_ring = (struct atl1e_rx_ring *) 1390 struct atl1e_rx_ring *rx_ring = &adapter->rx_ring;
1395 &adapter->rx_ring;
1396 struct atl1e_rx_page_desc *rx_page_desc = 1391 struct atl1e_rx_page_desc *rx_page_desc =
1397 (struct atl1e_rx_page_desc *) rx_ring->rx_page_desc; 1392 (struct atl1e_rx_page_desc *) rx_ring->rx_page_desc;
1398 struct sk_buff *skb = NULL; 1393 struct sk_buff *skb = NULL;
@@ -1576,7 +1571,7 @@ static struct atl1e_tpd_desc *atl1e_get_tpd(struct atl1e_adapter *adapter)
1576 tx_ring->next_to_use = 0; 1571 tx_ring->next_to_use = 0;
1577 1572
1578 memset(&tx_ring->desc[next_to_use], 0, sizeof(struct atl1e_tpd_desc)); 1573 memset(&tx_ring->desc[next_to_use], 0, sizeof(struct atl1e_tpd_desc));
1579 return (struct atl1e_tpd_desc *)&tx_ring->desc[next_to_use]; 1574 return &tx_ring->desc[next_to_use];
1580} 1575}
1581 1576
1582static struct atl1e_tx_buffer * 1577static struct atl1e_tx_buffer *
@@ -2061,8 +2056,8 @@ static int atl1e_suspend(struct pci_dev *pdev, pm_message_t state)
2061 2056
2062 if (wufc) { 2057 if (wufc) {
2063 /* get link status */ 2058 /* get link status */
2064 atl1e_read_phy_reg(hw, MII_BMSR, (u16 *)&mii_bmsr_data); 2059 atl1e_read_phy_reg(hw, MII_BMSR, &mii_bmsr_data);
2065 atl1e_read_phy_reg(hw, MII_BMSR, (u16 *)&mii_bmsr_data); 2060 atl1e_read_phy_reg(hw, MII_BMSR, &mii_bmsr_data);
2066 2061
2067 mii_advertise_data = ADVERTISE_10HALF; 2062 mii_advertise_data = ADVERTISE_10HALF;
2068 2063
@@ -2086,7 +2081,7 @@ static int atl1e_suspend(struct pci_dev *pdev, pm_message_t state)
2086 for (i = 0; i < AT_SUSPEND_LINK_TIMEOUT; i++) { 2081 for (i = 0; i < AT_SUSPEND_LINK_TIMEOUT; i++) {
2087 msleep(100); 2082 msleep(100);
2088 atl1e_read_phy_reg(hw, MII_BMSR, 2083 atl1e_read_phy_reg(hw, MII_BMSR,
2089 (u16 *)&mii_bmsr_data); 2084 &mii_bmsr_data);
2090 if (mii_bmsr_data & BMSR_LSTATUS) 2085 if (mii_bmsr_data & BMSR_LSTATUS)
2091 break; 2086 break;
2092 } 2087 }
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 5d10884e5080..149a294d54e9 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -1061,7 +1061,7 @@ static s32 atl1_setup_ring_resources(struct atl1_adapter *adapter)
1061 goto err_nomem; 1061 goto err_nomem;
1062 } 1062 }
1063 rfd_ring->buffer_info = 1063 rfd_ring->buffer_info =
1064 (struct atl1_buffer *)(tpd_ring->buffer_info + tpd_ring->count); 1064 (tpd_ring->buffer_info + tpd_ring->count);
1065 1065
1066 /* 1066 /*
1067 * real ring DMA buffer 1067 * real ring DMA buffer
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index ac7b74488531..ff5d3c1f1217 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -872,8 +872,7 @@ bnx2_alloc_mem(struct bnx2 *bp)
872 872
873 bnapi = &bp->bnx2_napi[i]; 873 bnapi = &bp->bnx2_napi[i];
874 874
875 sblk = (void *) (status_blk + 875 sblk = (status_blk + BNX2_SBLK_MSIX_ALIGN_SIZE * i);
876 BNX2_SBLK_MSIX_ALIGN_SIZE * i);
877 bnapi->status_blk.msix = sblk; 876 bnapi->status_blk.msix = sblk;
878 bnapi->hw_tx_cons_ptr = 877 bnapi->hw_tx_cons_ptr =
879 &sblk->status_tx_quick_consumer_index; 878 &sblk->status_tx_quick_consumer_index;
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index c95e7b5e2b85..65e66caea50d 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -2585,7 +2585,7 @@ static void cnic_bnx2x_kwqe_err(struct cnic_dev *dev, struct kwqe *kwqe)
2585 return; 2585 return;
2586 } 2586 }
2587 2587
2588 cqes[0] = (struct kcqe *) &kcqe; 2588 cqes[0] = &kcqe;
2589 cnic_reply_bnx2x_kcqes(dev, ulp_type, cqes, 1); 2589 cnic_reply_bnx2x_kcqes(dev, ulp_type, cqes, 1);
2590} 2590}
2591 2591
@@ -4665,9 +4665,9 @@ static int cnic_start_bnx2_hw(struct cnic_dev *dev)
4665 4665
4666 cp->kcq1.sw_prod_idx = 0; 4666 cp->kcq1.sw_prod_idx = 0;
4667 cp->kcq1.hw_prod_idx_ptr = 4667 cp->kcq1.hw_prod_idx_ptr =
4668 (u16 *) &sblk->status_completion_producer_index; 4668 &sblk->status_completion_producer_index;
4669 4669
4670 cp->kcq1.status_idx_ptr = (u16 *) &sblk->status_idx; 4670 cp->kcq1.status_idx_ptr = &sblk->status_idx;
4671 4671
4672 /* Initialize the kernel complete queue context. */ 4672 /* Initialize the kernel complete queue context. */
4673 val = KRNLQ_TYPE_TYPE_KRNLQ | KRNLQ_SIZE_TYPE_SIZE | 4673 val = KRNLQ_TYPE_TYPE_KRNLQ | KRNLQ_SIZE_TYPE_SIZE |
@@ -4693,9 +4693,9 @@ static int cnic_start_bnx2_hw(struct cnic_dev *dev)
4693 u32 sb = BNX2_L2CTX_L5_STATUSB_NUM(sb_id); 4693 u32 sb = BNX2_L2CTX_L5_STATUSB_NUM(sb_id);
4694 4694
4695 cp->kcq1.hw_prod_idx_ptr = 4695 cp->kcq1.hw_prod_idx_ptr =
4696 (u16 *) &msblk->status_completion_producer_index; 4696 &msblk->status_completion_producer_index;
4697 cp->kcq1.status_idx_ptr = (u16 *) &msblk->status_idx; 4697 cp->kcq1.status_idx_ptr = &msblk->status_idx;
4698 cp->kwq_con_idx_ptr = (u16 *) &msblk->status_cmd_consumer_index; 4698 cp->kwq_con_idx_ptr = &msblk->status_cmd_consumer_index;
4699 cp->int_num = sb_id << BNX2_PCICFG_INT_ACK_CMD_INT_NUM_SHIFT; 4699 cp->int_num = sb_id << BNX2_PCICFG_INT_ACK_CMD_INT_NUM_SHIFT;
4700 cnic_ctx_wr(dev, kwq_cid_addr, L5_KRNLQ_HOST_QIDX, sb); 4700 cnic_ctx_wr(dev, kwq_cid_addr, L5_KRNLQ_HOST_QIDX, sb);
4701 cnic_ctx_wr(dev, kcq_cid_addr, L5_KRNLQ_HOST_QIDX, sb); 4701 cnic_ctx_wr(dev, kcq_cid_addr, L5_KRNLQ_HOST_QIDX, sb);
diff --git a/drivers/net/ethernet/brocade/bna/cna_fwimg.c b/drivers/net/ethernet/brocade/bna/cna_fwimg.c
index cfc22a64157e..6a68e8d93309 100644
--- a/drivers/net/ethernet/brocade/bna/cna_fwimg.c
+++ b/drivers/net/ethernet/brocade/bna/cna_fwimg.c
@@ -67,10 +67,10 @@ bfa_cb_image_get_chunk(enum bfi_asic_gen asic_gen, u32 off)
67{ 67{
68 switch (asic_gen) { 68 switch (asic_gen) {
69 case BFI_ASIC_GEN_CT: 69 case BFI_ASIC_GEN_CT:
70 return (u32 *)(bfi_image_ct_cna + off); 70 return (bfi_image_ct_cna + off);
71 break; 71 break;
72 case BFI_ASIC_GEN_CT2: 72 case BFI_ASIC_GEN_CT2:
73 return (u32 *)(bfi_image_ct2_cna + off); 73 return (bfi_image_ct2_cna + off);
74 break; 74 break;
75 default: 75 default:
76 return NULL; 76 return NULL;
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
index 65e4b280619a..55cf72af69ce 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
@@ -575,7 +575,7 @@ static void t3_process_tid_release_list(struct work_struct *work)
575 if (!skb) { 575 if (!skb) {
576 spin_lock_bh(&td->tid_release_lock); 576 spin_lock_bh(&td->tid_release_lock);
577 p->ctx = (void *)td->tid_release_list; 577 p->ctx = (void *)td->tid_release_list;
578 td->tid_release_list = (struct t3c_tid_entry *)p; 578 td->tid_release_list = p;
579 break; 579 break;
580 } 580 }
581 mk_tid_release(skb, p - td->tid_maps.tid_tab); 581 mk_tid_release(skb, p - td->tid_maps.tid_tab);
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index e111d974afd8..8596acaa402b 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -753,7 +753,7 @@ static void write_sgl(const struct sk_buff *skb, struct sge_txq *q,
753 end = (void *)q->desc + part1; 753 end = (void *)q->desc + part1;
754 } 754 }
755 if ((uintptr_t)end & 8) /* 0-pad to multiple of 16 */ 755 if ((uintptr_t)end & 8) /* 0-pad to multiple of 16 */
756 *(u64 *)end = 0; 756 *end = 0;
757} 757}
758 758
759/** 759/**
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 25e3308fc9d8..9dad56101e23 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -418,7 +418,7 @@ static int fwevtq_handler(struct sge_rspq *rspq, const __be64 *rsp,
418 * restart a TX Ethernet Queue which was stopped for lack of 418 * restart a TX Ethernet Queue which was stopped for lack of
419 * free TX Queue Descriptors ... 419 * free TX Queue Descriptors ...
420 */ 420 */
421 const struct cpl_sge_egr_update *p = (void *)cpl; 421 const struct cpl_sge_egr_update *p = cpl;
422 unsigned int qid = EGR_QID(be32_to_cpu(p->opcode_qid)); 422 unsigned int qid = EGR_QID(be32_to_cpu(p->opcode_qid));
423 struct sge *s = &adapter->sge; 423 struct sge *s = &adapter->sge;
424 struct sge_txq *tq; 424 struct sge_txq *tq;
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index 0bd585bba39d..f2d1ecdcaf98 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -934,7 +934,7 @@ static void write_sgl(const struct sk_buff *skb, struct sge_txq *tq,
934 end = (void *)tq->desc + part1; 934 end = (void *)tq->desc + part1;
935 } 935 }
936 if ((uintptr_t)end & 8) /* 0-pad to multiple of 16 */ 936 if ((uintptr_t)end & 8) /* 0-pad to multiple of 16 */
937 *(u64 *)end = 0; 937 *end = 0;
938} 938}
939 939
940/** 940/**
@@ -1323,8 +1323,7 @@ int t4vf_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1323 */ 1323 */
1324 if (unlikely((void *)sgl == (void *)tq->stat)) { 1324 if (unlikely((void *)sgl == (void *)tq->stat)) {
1325 sgl = (void *)tq->desc; 1325 sgl = (void *)tq->desc;
1326 end = (void *)((void *)tq->desc + 1326 end = ((void *)tq->desc + ((void *)end - (void *)tq->stat));
1327 ((void *)end - (void *)tq->stat));
1328 } 1327 }
1329 1328
1330 write_sgl(skb, tq, sgl, end, 0, addr); 1329 write_sgl(skb, tq, sgl, end, 0, addr);
diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index d3cd489d11a2..f879e9224846 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -3973,7 +3973,7 @@ DevicePresent(struct net_device *dev, u_long aprom_addr)
3973 tmp = srom_rd(aprom_addr, i); 3973 tmp = srom_rd(aprom_addr, i);
3974 *p++ = cpu_to_le16(tmp); 3974 *p++ = cpu_to_le16(tmp);
3975 } 3975 }
3976 de4x5_dbg_srom((struct de4x5_srom *)&lp->srom); 3976 de4x5_dbg_srom(&lp->srom);
3977 } 3977 }
3978} 3978}
3979 3979
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c
index 9ac14f804851..21c6574c5f15 100644
--- a/drivers/net/ethernet/freescale/ucc_geth.c
+++ b/drivers/net/ethernet/freescale/ucc_geth.c
@@ -185,7 +185,7 @@ static void mem_disp(u8 *addr, int size)
185 for (; (u32) i < (u32) addr + size4Aling; i += 4) 185 for (; (u32) i < (u32) addr + size4Aling; i += 4)
186 printk("%08x ", *((u32 *) (i))); 186 printk("%08x ", *((u32 *) (i)));
187 for (; (u32) i < (u32) addr + size; i++) 187 for (; (u32) i < (u32) addr + size; i++)
188 printk("%02x", *((u8 *) (i))); 188 printk("%02x", *((i)));
189 if (notAlign == 1) 189 if (notAlign == 1)
190 printk("\r\n"); 190 printk("\r\n");
191} 191}
diff --git a/drivers/net/ethernet/hp/hp100.c b/drivers/net/ethernet/hp/hp100.c
index d496673f0908..3f4391bede81 100644
--- a/drivers/net/ethernet/hp/hp100.c
+++ b/drivers/net/ethernet/hp/hp100.c
@@ -1217,7 +1217,7 @@ static int hp100_init_rxpdl(struct net_device *dev,
1217 1217
1218 ringptr->pdl = pdlptr + 1; 1218 ringptr->pdl = pdlptr + 1;
1219 ringptr->pdl_paddr = virt_to_whatever(dev, pdlptr + 1); 1219 ringptr->pdl_paddr = virt_to_whatever(dev, pdlptr + 1);
1220 ringptr->skb = (void *) NULL; 1220 ringptr->skb = NULL;
1221 1221
1222 /* 1222 /*
1223 * Write address and length of first PDL Fragment (which is used for 1223 * Write address and length of first PDL Fragment (which is used for
@@ -1243,7 +1243,7 @@ static int hp100_init_txpdl(struct net_device *dev,
1243 1243
1244 ringptr->pdl = pdlptr; /* +1; */ 1244 ringptr->pdl = pdlptr; /* +1; */
1245 ringptr->pdl_paddr = virt_to_whatever(dev, pdlptr); /* +1 */ 1245 ringptr->pdl_paddr = virt_to_whatever(dev, pdlptr); /* +1 */
1246 ringptr->skb = (void *) NULL; 1246 ringptr->skb = NULL;
1247 1247
1248 return roundup(MAX_TX_FRAG * 2 + 2, 4); 1248 return roundup(MAX_TX_FRAG * 2 + 2, 4);
1249} 1249}
@@ -1628,7 +1628,7 @@ static void hp100_clean_txring(struct net_device *dev)
1628 /* Conversion to new PCI API : NOP */ 1628 /* Conversion to new PCI API : NOP */
1629 pci_unmap_single(lp->pci_dev, (dma_addr_t) lp->txrhead->pdl[1], lp->txrhead->pdl[2], PCI_DMA_TODEVICE); 1629 pci_unmap_single(lp->pci_dev, (dma_addr_t) lp->txrhead->pdl[1], lp->txrhead->pdl[2], PCI_DMA_TODEVICE);
1630 dev_kfree_skb_any(lp->txrhead->skb); 1630 dev_kfree_skb_any(lp->txrhead->skb);
1631 lp->txrhead->skb = (void *) NULL; 1631 lp->txrhead->skb = NULL;
1632 lp->txrhead = lp->txrhead->next; 1632 lp->txrhead = lp->txrhead->next;
1633 lp->txrcommit--; 1633 lp->txrcommit--;
1634 } 1634 }
diff --git a/drivers/net/ethernet/i825xx/lp486e.c b/drivers/net/ethernet/i825xx/lp486e.c
index 6c2952c8ea15..3735bfa53600 100644
--- a/drivers/net/ethernet/i825xx/lp486e.c
+++ b/drivers/net/ethernet/i825xx/lp486e.c
@@ -629,10 +629,10 @@ init_i596(struct net_device *dev) {
629 629
630 memcpy ((void *)lp->eth_addr, dev->dev_addr, 6); 630 memcpy ((void *)lp->eth_addr, dev->dev_addr, 6);
631 lp->set_add.command = CmdIASetup; 631 lp->set_add.command = CmdIASetup;
632 i596_add_cmd(dev, (struct i596_cmd *)&lp->set_add); 632 i596_add_cmd(dev, &lp->set_add);
633 633
634 lp->tdr.command = CmdTDR; 634 lp->tdr.command = CmdTDR;
635 i596_add_cmd(dev, (struct i596_cmd *)&lp->tdr); 635 i596_add_cmd(dev, &lp->tdr);
636 636
637 if (lp->scb.command && i596_timeout(dev, "i82596 init", 200)) 637 if (lp->scb.command && i596_timeout(dev, "i82596 init", 200))
638 return 1; 638 return 1;
@@ -737,7 +737,7 @@ i596_cleanup_cmd(struct net_device *dev) {
737 737
738 lp = netdev_priv(dev); 738 lp = netdev_priv(dev);
739 while (lp->cmd_head) { 739 while (lp->cmd_head) {
740 cmd = (struct i596_cmd *)lp->cmd_head; 740 cmd = lp->cmd_head;
741 741
742 lp->cmd_head = pa_to_va(lp->cmd_head->pa_next); 742 lp->cmd_head = pa_to_va(lp->cmd_head->pa_next);
743 lp->cmd_backlog--; 743 lp->cmd_backlog--;
@@ -1281,7 +1281,7 @@ static void set_multicast_list(struct net_device *dev) {
1281 lp->i596_config[8] |= 0x01; 1281 lp->i596_config[8] |= 0x01;
1282 } 1282 }
1283 1283
1284 i596_add_cmd(dev, (struct i596_cmd *) &lp->set_conf); 1284 i596_add_cmd(dev, &lp->set_conf);
1285 } 1285 }
1286} 1286}
1287 1287
diff --git a/drivers/net/ethernet/i825xx/sun3_82586.c b/drivers/net/ethernet/i825xx/sun3_82586.c
index cae17f4bc93e..353f57f675d0 100644
--- a/drivers/net/ethernet/i825xx/sun3_82586.c
+++ b/drivers/net/ethernet/i825xx/sun3_82586.c
@@ -571,7 +571,7 @@ static int init586(struct net_device *dev)
571 } 571 }
572#endif 572#endif
573 573
574 ptr = alloc_rfa(dev,(void *)ptr); /* init receive-frame-area */ 574 ptr = alloc_rfa(dev,ptr); /* init receive-frame-area */
575 575
576 /* 576 /*
577 * alloc xmit-buffs / init xmit_cmds 577 * alloc xmit-buffs / init xmit_cmds
@@ -584,7 +584,7 @@ static int init586(struct net_device *dev)
584 ptr = (char *) ptr + XMIT_BUFF_SIZE; 584 ptr = (char *) ptr + XMIT_BUFF_SIZE;
585 p->xmit_buffs[i] = (struct tbd_struct *)ptr; /* TBD */ 585 p->xmit_buffs[i] = (struct tbd_struct *)ptr; /* TBD */
586 ptr = (char *) ptr + sizeof(struct tbd_struct); 586 ptr = (char *) ptr + sizeof(struct tbd_struct);
587 if((void *)ptr > (void *)dev->mem_end) 587 if(ptr > (void *)dev->mem_end)
588 { 588 {
589 printk("%s: not enough shared-mem for your configuration!\n",dev->name); 589 printk("%s: not enough shared-mem for your configuration!\n",dev->name);
590 return 1; 590 return 1;
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 04d901d0ff63..ec85bf1bffd1 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -1894,7 +1894,7 @@ static int rxq_init(struct mv643xx_eth_private *mp, int index)
1894 goto out_free; 1894 goto out_free;
1895 } 1895 }
1896 1896
1897 rx_desc = (struct rx_desc *)rxq->rx_desc_area; 1897 rx_desc = rxq->rx_desc_area;
1898 for (i = 0; i < rxq->rx_ring_size; i++) { 1898 for (i = 0; i < rxq->rx_ring_size; i++) {
1899 int nexti; 1899 int nexti;
1900 1900
@@ -1999,7 +1999,7 @@ static int txq_init(struct mv643xx_eth_private *mp, int index)
1999 1999
2000 txq->tx_desc_area_size = size; 2000 txq->tx_desc_area_size = size;
2001 2001
2002 tx_desc = (struct tx_desc *)txq->tx_desc_area; 2002 tx_desc = txq->tx_desc_area;
2003 for (i = 0; i < txq->tx_ring_size; i++) { 2003 for (i = 0; i < txq->tx_ring_size; i++) {
2004 struct tx_desc *txd = tx_desc + i; 2004 struct tx_desc *txd = tx_desc + i;
2005 int nexti; 2005 int nexti;
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index 1db023b075a1..59489722e898 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1032,7 +1032,7 @@ static int rxq_init(struct net_device *dev)
1032 } 1032 }
1033 memset((void *)pep->p_rx_desc_area, 0, size); 1033 memset((void *)pep->p_rx_desc_area, 0, size);
1034 /* initialize the next_desc_ptr links in the Rx descriptors ring */ 1034 /* initialize the next_desc_ptr links in the Rx descriptors ring */
1035 p_rx_desc = (struct rx_desc *)pep->p_rx_desc_area; 1035 p_rx_desc = pep->p_rx_desc_area;
1036 for (i = 0; i < rx_desc_num; i++) { 1036 for (i = 0; i < rx_desc_num; i++) {
1037 p_rx_desc[i].next_desc_ptr = pep->rx_desc_dma + 1037 p_rx_desc[i].next_desc_ptr = pep->rx_desc_dma +
1038 ((i + 1) % rx_desc_num) * sizeof(struct rx_desc); 1038 ((i + 1) % rx_desc_num) * sizeof(struct rx_desc);
@@ -1095,7 +1095,7 @@ static int txq_init(struct net_device *dev)
1095 } 1095 }
1096 memset((void *)pep->p_tx_desc_area, 0, pep->tx_desc_area_size); 1096 memset((void *)pep->p_tx_desc_area, 0, pep->tx_desc_area_size);
1097 /* Initialize the next_desc_ptr links in the Tx descriptors ring */ 1097 /* Initialize the next_desc_ptr links in the Tx descriptors ring */
1098 p_tx_desc = (struct tx_desc *)pep->p_tx_desc_area; 1098 p_tx_desc = pep->p_tx_desc_area;
1099 for (i = 0; i < tx_desc_num; i++) { 1099 for (i = 0; i < tx_desc_num; i++) {
1100 p_tx_desc[i].next_desc_ptr = pep->tx_desc_dma + 1100 p_tx_desc[i].next_desc_ptr = pep->tx_desc_dma +
1101 ((i + 1) % tx_desc_num) * sizeof(struct tx_desc); 1101 ((i + 1) % tx_desc_num) * sizeof(struct tx_desc);
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index b45d0e7f6ab0..766b8c5a235e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -779,7 +779,7 @@ static int qp_res_start_move_to(struct mlx4_dev *dev, int slave, int qpn,
779 r->com.to_state = state; 779 r->com.to_state = state;
780 r->com.state = RES_QP_BUSY; 780 r->com.state = RES_QP_BUSY;
781 if (qp) 781 if (qp)
782 *qp = (struct res_qp *)r; 782 *qp = r;
783 } 783 }
784 } 784 }
785 785
@@ -832,7 +832,7 @@ static int mr_res_start_move_to(struct mlx4_dev *dev, int slave, int index,
832 r->com.to_state = state; 832 r->com.to_state = state;
833 r->com.state = RES_MPT_BUSY; 833 r->com.state = RES_MPT_BUSY;
834 if (mpt) 834 if (mpt)
835 *mpt = (struct res_mpt *)r; 835 *mpt = r;
836 } 836 }
837 } 837 }
838 838
diff --git a/drivers/net/ethernet/neterion/s2io.c b/drivers/net/ethernet/neterion/s2io.c
index bb367582c1e8..e7cd587d8ae7 100644
--- a/drivers/net/ethernet/neterion/s2io.c
+++ b/drivers/net/ethernet/neterion/s2io.c
@@ -6946,9 +6946,9 @@ static int rxd_owner_bit_reset(struct s2io_nic *sp)
6946 if (sp->rxd_mode == RXD_MODE_3B) 6946 if (sp->rxd_mode == RXD_MODE_3B)
6947 ba = &ring->ba[j][k]; 6947 ba = &ring->ba[j][k];
6948 if (set_rxd_buffer_pointer(sp, rxdp, ba, &skb, 6948 if (set_rxd_buffer_pointer(sp, rxdp, ba, &skb,
6949 (u64 *)&temp0_64, 6949 &temp0_64,
6950 (u64 *)&temp1_64, 6950 &temp1_64,
6951 (u64 *)&temp2_64, 6951 &temp2_64,
6952 size) == -ENOMEM) { 6952 size) == -ENOMEM) {
6953 return 0; 6953 return 0;
6954 } 6954 }
@@ -7149,7 +7149,7 @@ static int s2io_card_up(struct s2io_nic *sp)
7149 int i, ret = 0; 7149 int i, ret = 0;
7150 struct config_param *config; 7150 struct config_param *config;
7151 struct mac_info *mac_control; 7151 struct mac_info *mac_control;
7152 struct net_device *dev = (struct net_device *)sp->dev; 7152 struct net_device *dev = sp->dev;
7153 u16 interruptible; 7153 u16 interruptible;
7154 7154
7155 /* Initialize the H/W I/O registers */ 7155 /* Initialize the H/W I/O registers */
@@ -7325,7 +7325,7 @@ static void s2io_tx_watchdog(struct net_device *dev)
7325static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp) 7325static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
7326{ 7326{
7327 struct s2io_nic *sp = ring_data->nic; 7327 struct s2io_nic *sp = ring_data->nic;
7328 struct net_device *dev = (struct net_device *)ring_data->dev; 7328 struct net_device *dev = ring_data->dev;
7329 struct sk_buff *skb = (struct sk_buff *) 7329 struct sk_buff *skb = (struct sk_buff *)
7330 ((unsigned long)rxdp->Host_Control); 7330 ((unsigned long)rxdp->Host_Control);
7331 int ring_no = ring_data->ring_no; 7331 int ring_no = ring_data->ring_no;
@@ -7508,7 +7508,7 @@ aggregate:
7508 7508
7509static void s2io_link(struct s2io_nic *sp, int link) 7509static void s2io_link(struct s2io_nic *sp, int link)
7510{ 7510{
7511 struct net_device *dev = (struct net_device *)sp->dev; 7511 struct net_device *dev = sp->dev;
7512 struct swStat *swstats = &sp->mac_control.stats_info->sw_stat; 7512 struct swStat *swstats = &sp->mac_control.stats_info->sw_stat;
7513 7513
7514 if (link != sp->last_link_state) { 7514 if (link != sp->last_link_state) {
@@ -8280,7 +8280,7 @@ static int check_L2_lro_capable(u8 *buffer, struct iphdr **ip,
8280 return -1; 8280 return -1;
8281 } 8281 }
8282 8282
8283 *ip = (struct iphdr *)((u8 *)buffer + ip_off); 8283 *ip = (struct iphdr *)(buffer + ip_off);
8284 ip_len = (u8)((*ip)->ihl); 8284 ip_len = (u8)((*ip)->ihl);
8285 ip_len <<= 2; 8285 ip_len <<= 2;
8286 *tcp = (struct tcphdr *)((unsigned long)*ip + ip_len); 8286 *tcp = (struct tcphdr *)((unsigned long)*ip + ip_len);
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
index 98e2c10ae08b..32d06824fe3e 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c
@@ -2346,7 +2346,7 @@ void __vxge_hw_blockpool_blocks_add(struct __vxge_hw_blockpool *blockpool)
2346 2346
2347 for (i = 0; i < nreq; i++) 2347 for (i = 0; i < nreq; i++)
2348 vxge_os_dma_malloc_async( 2348 vxge_os_dma_malloc_async(
2349 ((struct __vxge_hw_device *)blockpool->hldev)->pdev, 2349 (blockpool->hldev)->pdev,
2350 blockpool->hldev, VXGE_HW_BLOCK_SIZE); 2350 blockpool->hldev, VXGE_HW_BLOCK_SIZE);
2351} 2351}
2352 2352
@@ -2428,13 +2428,13 @@ __vxge_hw_blockpool_blocks_remove(struct __vxge_hw_blockpool *blockpool)
2428 break; 2428 break;
2429 2429
2430 pci_unmap_single( 2430 pci_unmap_single(
2431 ((struct __vxge_hw_device *)blockpool->hldev)->pdev, 2431 (blockpool->hldev)->pdev,
2432 ((struct __vxge_hw_blockpool_entry *)p)->dma_addr, 2432 ((struct __vxge_hw_blockpool_entry *)p)->dma_addr,
2433 ((struct __vxge_hw_blockpool_entry *)p)->length, 2433 ((struct __vxge_hw_blockpool_entry *)p)->length,
2434 PCI_DMA_BIDIRECTIONAL); 2434 PCI_DMA_BIDIRECTIONAL);
2435 2435
2436 vxge_os_dma_free( 2436 vxge_os_dma_free(
2437 ((struct __vxge_hw_device *)blockpool->hldev)->pdev, 2437 (blockpool->hldev)->pdev,
2438 ((struct __vxge_hw_blockpool_entry *)p)->memblock, 2438 ((struct __vxge_hw_blockpool_entry *)p)->memblock,
2439 &((struct __vxge_hw_blockpool_entry *)p)->acc_handle); 2439 &((struct __vxge_hw_blockpool_entry *)p)->acc_handle);
2440 2440
@@ -4059,7 +4059,7 @@ __vxge_hw_vpath_sw_reset(struct __vxge_hw_device *hldev, u32 vp_id)
4059 enum vxge_hw_status status = VXGE_HW_OK; 4059 enum vxge_hw_status status = VXGE_HW_OK;
4060 struct __vxge_hw_virtualpath *vpath; 4060 struct __vxge_hw_virtualpath *vpath;
4061 4061
4062 vpath = (struct __vxge_hw_virtualpath *)&hldev->virtual_paths[vp_id]; 4062 vpath = &hldev->virtual_paths[vp_id];
4063 4063
4064 if (vpath->ringh) { 4064 if (vpath->ringh) {
4065 status = __vxge_hw_ring_reset(vpath->ringh); 4065 status = __vxge_hw_ring_reset(vpath->ringh);
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.h b/drivers/net/ethernet/neterion/vxge/vxge-config.h
index 5046a64f0fe8..9e0c1eed5dc5 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.h
+++ b/drivers/net/ethernet/neterion/vxge/vxge-config.h
@@ -1922,7 +1922,7 @@ realloc:
1922 /* misaligned, free current one and try allocating 1922 /* misaligned, free current one and try allocating
1923 * size + VXGE_CACHE_LINE_SIZE memory 1923 * size + VXGE_CACHE_LINE_SIZE memory
1924 */ 1924 */
1925 kfree((void *) vaddr); 1925 kfree(vaddr);
1926 size += VXGE_CACHE_LINE_SIZE; 1926 size += VXGE_CACHE_LINE_SIZE;
1927 realloc_flag = 1; 1927 realloc_flag = 1;
1928 goto realloc; 1928 goto realloc;
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-main.c b/drivers/net/ethernet/neterion/vxge/vxge-main.c
index 51387c31914b..2578eb1f025d 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-main.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-main.c
@@ -1134,7 +1134,7 @@ static void vxge_set_multicast(struct net_device *dev)
1134 "%s:%d", __func__, __LINE__); 1134 "%s:%d", __func__, __LINE__);
1135 1135
1136 vdev = netdev_priv(dev); 1136 vdev = netdev_priv(dev);
1137 hldev = (struct __vxge_hw_device *)vdev->devh; 1137 hldev = vdev->devh;
1138 1138
1139 if (unlikely(!is_vxge_card_up(vdev))) 1139 if (unlikely(!is_vxge_card_up(vdev)))
1140 return; 1140 return;
@@ -3989,16 +3989,16 @@ static void __devinit vxge_print_parm(struct vxgedev *vdev, u64 vpath_mask)
3989 continue; 3989 continue;
3990 vxge_debug_ll_config(VXGE_TRACE, 3990 vxge_debug_ll_config(VXGE_TRACE,
3991 "%s: MTU size - %d", vdev->ndev->name, 3991 "%s: MTU size - %d", vdev->ndev->name,
3992 ((struct __vxge_hw_device *)(vdev->devh))-> 3992 ((vdev->devh))->
3993 config.vp_config[i].mtu); 3993 config.vp_config[i].mtu);
3994 vxge_debug_init(VXGE_TRACE, 3994 vxge_debug_init(VXGE_TRACE,
3995 "%s: VLAN tag stripping %s", vdev->ndev->name, 3995 "%s: VLAN tag stripping %s", vdev->ndev->name,
3996 ((struct __vxge_hw_device *)(vdev->devh))-> 3996 ((vdev->devh))->
3997 config.vp_config[i].rpa_strip_vlan_tag 3997 config.vp_config[i].rpa_strip_vlan_tag
3998 ? "Enabled" : "Disabled"); 3998 ? "Enabled" : "Disabled");
3999 vxge_debug_ll_config(VXGE_TRACE, 3999 vxge_debug_ll_config(VXGE_TRACE,
4000 "%s: Max frags : %d", vdev->ndev->name, 4000 "%s: Max frags : %d", vdev->ndev->name,
4001 ((struct __vxge_hw_device *)(vdev->devh))-> 4001 ((vdev->devh))->
4002 config.vp_config[i].fifo.max_frags); 4002 config.vp_config[i].fifo.max_frags);
4003 break; 4003 break;
4004 } 4004 }
diff --git a/drivers/net/ethernet/neterion/vxge/vxge-traffic.c b/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
index 5954fa264da1..99749bd07d72 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-traffic.c
@@ -533,8 +533,7 @@ __vxge_hw_device_handle_error(struct __vxge_hw_device *hldev, u32 vp_id,
533 533
534 /* notify driver */ 534 /* notify driver */
535 if (hldev->uld_callbacks->crit_err) 535 if (hldev->uld_callbacks->crit_err)
536 hldev->uld_callbacks->crit_err( 536 hldev->uld_callbacks->crit_err(hldev,
537 (struct __vxge_hw_device *)hldev,
538 type, vp_id); 537 type, vp_id);
539out: 538out:
540 539
@@ -1322,7 +1321,7 @@ enum vxge_hw_status vxge_hw_ring_rxd_next_completed(
1322 /* check whether it is not the end */ 1321 /* check whether it is not the end */
1323 if (!own || *t_code == VXGE_HW_RING_T_CODE_FRM_DROP) { 1322 if (!own || *t_code == VXGE_HW_RING_T_CODE_FRM_DROP) {
1324 1323
1325 vxge_assert(((struct vxge_hw_ring_rxd_1 *)rxdp)->host_control != 1324 vxge_assert((rxdp)->host_control !=
1326 0); 1325 0);
1327 1326
1328 ++ring->cmpl_cnt; 1327 ++ring->cmpl_cnt;
diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c
index ac149d99f78f..b5ba3084c7fc 100644
--- a/drivers/net/ethernet/sgi/ioc3-eth.c
+++ b/drivers/net/ethernet/sgi/ioc3-eth.c
@@ -583,7 +583,7 @@ static inline void ioc3_rx(struct net_device *dev)
583 unsigned long *rxr; 583 unsigned long *rxr;
584 u32 w0, err; 584 u32 w0, err;
585 585
586 rxr = (unsigned long *) ip->rxr; /* Ring base */ 586 rxr = ip->rxr; /* Ring base */
587 rx_entry = ip->rx_ci; /* RX consume index */ 587 rx_entry = ip->rx_ci; /* RX consume index */
588 n_entry = ip->rx_pi; 588 n_entry = ip->rx_pi;
589 589
@@ -903,7 +903,7 @@ static void ioc3_alloc_rings(struct net_device *dev)
903 if (ip->rxr == NULL) { 903 if (ip->rxr == NULL) {
904 /* Allocate and initialize rx ring. 4kb = 512 entries */ 904 /* Allocate and initialize rx ring. 4kb = 512 entries */
905 ip->rxr = (unsigned long *) get_zeroed_page(GFP_ATOMIC); 905 ip->rxr = (unsigned long *) get_zeroed_page(GFP_ATOMIC);
906 rxr = (unsigned long *) ip->rxr; 906 rxr = ip->rxr;
907 if (!rxr) 907 if (!rxr)
908 printk("ioc3_alloc_rings(): get_zeroed_page() failed!\n"); 908 printk("ioc3_alloc_rings(): get_zeroed_page() failed!\n");
909 909
diff --git a/drivers/net/ethernet/smsc/smsc9420.c b/drivers/net/ethernet/smsc/smsc9420.c
index fd33b21f6c96..1fcd914ec39b 100644
--- a/drivers/net/ethernet/smsc/smsc9420.c
+++ b/drivers/net/ethernet/smsc/smsc9420.c
@@ -1640,8 +1640,7 @@ smsc9420_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1640 goto out_free_io_4; 1640 goto out_free_io_4;
1641 1641
1642 /* descriptors are aligned due to the nature of pci_alloc_consistent */ 1642 /* descriptors are aligned due to the nature of pci_alloc_consistent */
1643 pd->tx_ring = (struct smsc9420_dma_desc *) 1643 pd->tx_ring = (pd->rx_ring + RX_RING_SIZE);
1644 (pd->rx_ring + RX_RING_SIZE);
1645 pd->tx_dma_addr = pd->rx_dma_addr + 1644 pd->tx_dma_addr = pd->rx_dma_addr +
1646 sizeof(struct smsc9420_dma_desc) * RX_RING_SIZE; 1645 sizeof(struct smsc9420_dma_desc) * RX_RING_SIZE;
1647 1646
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 3dd8f0803808..df4774d5f6a7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -190,7 +190,7 @@ static int stmmac_pltfr_remove(struct platform_device *pdev)
190 190
191 platform_set_drvdata(pdev, NULL); 191 platform_set_drvdata(pdev, NULL);
192 192
193 iounmap((void *)priv->ioaddr); 193 iounmap((void __force __iomem *)priv->ioaddr);
194 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 194 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
195 release_mem_region(res->start, resource_size(res)); 195 release_mem_region(res->start, resource_size(res));
196 196
diff --git a/drivers/net/ethernet/sun/sunqe.c b/drivers/net/ethernet/sun/sunqe.c
index 7d4a040d84a2..aeded7ff1c8f 100644
--- a/drivers/net/ethernet/sun/sunqe.c
+++ b/drivers/net/ethernet/sun/sunqe.c
@@ -441,7 +441,7 @@ static void qe_rx(struct sunqe *qep)
441 } else { 441 } else {
442 skb_reserve(skb, 2); 442 skb_reserve(skb, 2);
443 skb_put(skb, len); 443 skb_put(skb, len);
444 skb_copy_to_linear_data(skb, (unsigned char *) this_qbuf, 444 skb_copy_to_linear_data(skb, this_qbuf,
445 len); 445 len);
446 skb->protocol = eth_type_trans(skb, qep->dev); 446 skb->protocol = eth_type_trans(skb, qep->dev);
447 netif_rx(skb); 447 netif_rx(skb);
diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index ea3e0a21ba74..a46c19859683 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
@@ -486,7 +486,7 @@ static void __devinit velocity_get_options(struct velocity_opt *opts, int index,
486 velocity_set_bool_opt(&opts->flags, IP_byte_align[index], IP_ALIG_DEF, VELOCITY_FLAGS_IP_ALIGN, "IP_byte_align", devname); 486 velocity_set_bool_opt(&opts->flags, IP_byte_align[index], IP_ALIG_DEF, VELOCITY_FLAGS_IP_ALIGN, "IP_byte_align", devname);
487 velocity_set_bool_opt(&opts->flags, ValPktLen[index], VAL_PKT_LEN_DEF, VELOCITY_FLAGS_VAL_PKT_LEN, "ValPktLen", devname); 487 velocity_set_bool_opt(&opts->flags, ValPktLen[index], VAL_PKT_LEN_DEF, VELOCITY_FLAGS_VAL_PKT_LEN, "ValPktLen", devname);
488 velocity_set_int_opt((int *) &opts->spd_dpx, speed_duplex[index], MED_LNK_MIN, MED_LNK_MAX, MED_LNK_DEF, "Media link mode", devname); 488 velocity_set_int_opt((int *) &opts->spd_dpx, speed_duplex[index], MED_LNK_MIN, MED_LNK_MAX, MED_LNK_DEF, "Media link mode", devname);
489 velocity_set_int_opt((int *) &opts->wol_opts, wol_opts[index], WOL_OPT_MIN, WOL_OPT_MAX, WOL_OPT_DEF, "Wake On Lan options", devname); 489 velocity_set_int_opt(&opts->wol_opts, wol_opts[index], WOL_OPT_MIN, WOL_OPT_MAX, WOL_OPT_DEF, "Wake On Lan options", devname);
490 opts->numrx = (opts->numrx & ~3); 490 opts->numrx = (opts->numrx & ~3);
491} 491}
492 492