aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/s2io.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-16 15:08:06 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-21 18:48:29 -0400
commit43d620c82985b19008d87a437b4cf83f356264f7 (patch)
tree8ea6d9d1ab5d36e7bc130b5189997e12edb01fb6 /drivers/net/s2io.c
parentdadbe85ac47f180fa1e3ef93b276ab7938b1a98b (diff)
drivers/net: Remove casts of void *
Unnecessary casts of void * clutter the code. These are the remainder casts after several specific patches to remove netdev_priv and dev_priv. Done via coccinelle script (and a little editing): $ cat cast_void_pointer.cocci @@ type T; T *pt; void *pv; @@ - pt = (T *)pv; + pt = pv; Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Acked-By: Chris Snook <chris.snook@gmail.com> Acked-by: Jon Mason <jdmason@kudzu.us> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r--drivers/net/s2io.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index df0d2c8ecc09..f4d80f9050ef 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -841,7 +841,7 @@ static int init_shared_mem(struct s2io_nic *nic)
841 tmp_p_addr = ring->rx_blocks[j].block_dma_addr; 841 tmp_p_addr = ring->rx_blocks[j].block_dma_addr;
842 tmp_p_addr_next = ring->rx_blocks[next].block_dma_addr; 842 tmp_p_addr_next = ring->rx_blocks[next].block_dma_addr;
843 843
844 pre_rxd_blk = (struct RxD_block *)tmp_v_addr; 844 pre_rxd_blk = tmp_v_addr;
845 pre_rxd_blk->reserved_2_pNext_RxD_block = 845 pre_rxd_blk->reserved_2_pNext_RxD_block =
846 (unsigned long)tmp_v_addr_next; 846 (unsigned long)tmp_v_addr_next;
847 pre_rxd_blk->pNext_RxD_Blk_physical = 847 pre_rxd_blk->pNext_RxD_Blk_physical =
@@ -918,7 +918,7 @@ static int init_shared_mem(struct s2io_nic *nic)
918 mac_control->stats_mem_sz = size; 918 mac_control->stats_mem_sz = size;
919 919
920 tmp_v_addr = mac_control->stats_mem; 920 tmp_v_addr = mac_control->stats_mem;
921 mac_control->stats_info = (struct stat_block *)tmp_v_addr; 921 mac_control->stats_info = tmp_v_addr;
922 memset(tmp_v_addr, 0, size); 922 memset(tmp_v_addr, 0, size);
923 DBG_PRINT(INIT_DBG, "%s: Ring Mem PHY: 0x%llx\n", 923 DBG_PRINT(INIT_DBG, "%s: Ring Mem PHY: 0x%llx\n",
924 dev_name(&nic->pdev->dev), (unsigned long long)tmp_p_addr); 924 dev_name(&nic->pdev->dev), (unsigned long long)tmp_p_addr);
@@ -2439,7 +2439,7 @@ static void free_tx_buffers(struct s2io_nic *nic)
2439 2439
2440 spin_lock_irqsave(&fifo->tx_lock, flags); 2440 spin_lock_irqsave(&fifo->tx_lock, flags);
2441 for (j = 0; j < tx_cfg->fifo_len; j++) { 2441 for (j = 0; j < tx_cfg->fifo_len; j++) {
2442 txdp = (struct TxD *)fifo->list_info[j].list_virt_addr; 2442 txdp = fifo->list_info[j].list_virt_addr;
2443 skb = s2io_txdl_getskb(&mac_control->fifos[i], txdp, j); 2443 skb = s2io_txdl_getskb(&mac_control->fifos[i], txdp, j);
2444 if (skb) { 2444 if (skb) {
2445 swstats->mem_freed += skb->truesize; 2445 swstats->mem_freed += skb->truesize;
@@ -3075,8 +3075,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
3075 3075
3076 get_info = fifo_data->tx_curr_get_info; 3076 get_info = fifo_data->tx_curr_get_info;
3077 memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info)); 3077 memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info));
3078 txdlp = (struct TxD *) 3078 txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
3079 fifo_data->list_info[get_info.offset].list_virt_addr;
3080 while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && 3079 while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) &&
3081 (get_info.offset != put_info.offset) && 3080 (get_info.offset != put_info.offset) &&
3082 (txdlp->Host_Control)) { 3081 (txdlp->Host_Control)) {
@@ -3129,8 +3128,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
3129 get_info.offset++; 3128 get_info.offset++;
3130 if (get_info.offset == get_info.fifo_len + 1) 3129 if (get_info.offset == get_info.fifo_len + 1)
3131 get_info.offset = 0; 3130 get_info.offset = 0;
3132 txdlp = (struct TxD *) 3131 txdlp = fifo_data->list_info[get_info.offset].list_virt_addr;
3133 fifo_data->list_info[get_info.offset].list_virt_addr;
3134 fifo_data->tx_curr_get_info.offset = get_info.offset; 3132 fifo_data->tx_curr_get_info.offset = get_info.offset;
3135 } 3133 }
3136 3134
@@ -4163,7 +4161,7 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4163 4161
4164 put_off = (u16)fifo->tx_curr_put_info.offset; 4162 put_off = (u16)fifo->tx_curr_put_info.offset;
4165 get_off = (u16)fifo->tx_curr_get_info.offset; 4163 get_off = (u16)fifo->tx_curr_get_info.offset;
4166 txdp = (struct TxD *)fifo->list_info[put_off].list_virt_addr; 4164 txdp = fifo->list_info[put_off].list_virt_addr;
4167 4165
4168 queue_len = fifo->tx_curr_put_info.fifo_len + 1; 4166 queue_len = fifo->tx_curr_put_info.fifo_len + 1;
4169 /* Avoid "put" pointer going beyond "get" pointer */ 4167 /* Avoid "put" pointer going beyond "get" pointer */
@@ -7972,9 +7970,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7972 7970
7973 /* Initializing the BAR1 address as the start of the FIFO pointer. */ 7971 /* Initializing the BAR1 address as the start of the FIFO pointer. */
7974 for (j = 0; j < MAX_TX_FIFOS; j++) { 7972 for (j = 0; j < MAX_TX_FIFOS; j++) {
7975 mac_control->tx_FIFO_start[j] = 7973 mac_control->tx_FIFO_start[j] = sp->bar1 + (j * 0x00020000);
7976 (struct TxFIFO_element __iomem *)
7977 (sp->bar1 + (j * 0x00020000));
7978 } 7974 }
7979 7975
7980 /* Driver entry points */ 7976 /* Driver entry points */