diff options
author | Joe Perches <joe@perches.com> | 2011-06-16 15:08:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-21 18:48:29 -0400 |
commit | 43d620c82985b19008d87a437b4cf83f356264f7 (patch) | |
tree | 8ea6d9d1ab5d36e7bc130b5189997e12edb01fb6 /drivers/net/netxen | |
parent | dadbe85ac47f180fa1e3ef93b276ab7938b1a98b (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/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_ctx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c index f16966afa64e..a925392abd6f 100644 --- a/drivers/net/netxen/netxen_nic_ctx.c +++ b/drivers/net/netxen/netxen_nic_ctx.c | |||
@@ -163,7 +163,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter) | |||
163 | rq_size, &hostrq_phys_addr); | 163 | rq_size, &hostrq_phys_addr); |
164 | if (addr == NULL) | 164 | if (addr == NULL) |
165 | return -ENOMEM; | 165 | return -ENOMEM; |
166 | prq = (nx_hostrq_rx_ctx_t *)addr; | 166 | prq = addr; |
167 | 167 | ||
168 | addr = pci_alloc_consistent(adapter->pdev, | 168 | addr = pci_alloc_consistent(adapter->pdev, |
169 | rsp_size, &cardrsp_phys_addr); | 169 | rsp_size, &cardrsp_phys_addr); |
@@ -171,7 +171,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter) | |||
171 | err = -ENOMEM; | 171 | err = -ENOMEM; |
172 | goto out_free_rq; | 172 | goto out_free_rq; |
173 | } | 173 | } |
174 | prsp = (nx_cardrsp_rx_ctx_t *)addr; | 174 | prsp = addr; |
175 | 175 | ||
176 | prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr); | 176 | prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr); |
177 | 177 | ||
@@ -318,10 +318,10 @@ nx_fw_cmd_create_tx_ctx(struct netxen_adapter *adapter) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | memset(rq_addr, 0, rq_size); | 320 | memset(rq_addr, 0, rq_size); |
321 | prq = (nx_hostrq_tx_ctx_t *)rq_addr; | 321 | prq = rq_addr; |
322 | 322 | ||
323 | memset(rsp_addr, 0, rsp_size); | 323 | memset(rsp_addr, 0, rsp_size); |
324 | prsp = (nx_cardrsp_tx_ctx_t *)rsp_addr; | 324 | prsp = rsp_addr; |
325 | 325 | ||
326 | prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr); | 326 | prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr); |
327 | 327 | ||
@@ -629,7 +629,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) | |||
629 | } | 629 | } |
630 | 630 | ||
631 | memset(addr, 0, sizeof(struct netxen_ring_ctx)); | 631 | memset(addr, 0, sizeof(struct netxen_ring_ctx)); |
632 | recv_ctx->hwctx = (struct netxen_ring_ctx *)addr; | 632 | recv_ctx->hwctx = addr; |
633 | recv_ctx->hwctx->ctx_id = cpu_to_le32(port); | 633 | recv_ctx->hwctx->ctx_id = cpu_to_le32(port); |
634 | recv_ctx->hwctx->cmd_consumer_offset = | 634 | recv_ctx->hwctx->cmd_consumer_offset = |
635 | cpu_to_le64(recv_ctx->phys_addr + | 635 | cpu_to_le64(recv_ctx->phys_addr + |
@@ -648,7 +648,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) | |||
648 | goto err_out_free; | 648 | goto err_out_free; |
649 | } | 649 | } |
650 | 650 | ||
651 | tx_ring->desc_head = (struct cmd_desc_type0 *)addr; | 651 | tx_ring->desc_head = addr; |
652 | 652 | ||
653 | for (ring = 0; ring < adapter->max_rds_rings; ring++) { | 653 | for (ring = 0; ring < adapter->max_rds_rings; ring++) { |
654 | rds_ring = &recv_ctx->rds_rings[ring]; | 654 | rds_ring = &recv_ctx->rds_rings[ring]; |
@@ -662,7 +662,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) | |||
662 | err = -ENOMEM; | 662 | err = -ENOMEM; |
663 | goto err_out_free; | 663 | goto err_out_free; |
664 | } | 664 | } |
665 | rds_ring->desc_head = (struct rcv_desc *)addr; | 665 | rds_ring->desc_head = addr; |
666 | 666 | ||
667 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) | 667 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) |
668 | rds_ring->crb_rcv_producer = | 668 | rds_ring->crb_rcv_producer = |
@@ -683,7 +683,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) | |||
683 | err = -ENOMEM; | 683 | err = -ENOMEM; |
684 | goto err_out_free; | 684 | goto err_out_free; |
685 | } | 685 | } |
686 | sds_ring->desc_head = (struct status_desc *)addr; | 686 | sds_ring->desc_head = addr; |
687 | 687 | ||
688 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { | 688 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { |
689 | sds_ring->crb_sts_consumer = | 689 | sds_ring->crb_sts_consumer = |