diff options
author | Joe Perches <joe@perches.com> | 2011-06-16 19:08:06 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-21 15:48:29 -0700 |
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 f16966afa64..a925392abd6 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) rq_size, &hostrq_phys_addr); if (addr == NULL) return -ENOMEM; - prq = (nx_hostrq_rx_ctx_t *)addr; + prq = addr; addr = pci_alloc_consistent(adapter->pdev, rsp_size, &cardrsp_phys_addr); @@ -171,7 +171,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter) err = -ENOMEM; goto out_free_rq; } - prsp = (nx_cardrsp_rx_ctx_t *)addr; + prsp = addr; prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr); @@ -318,10 +318,10 @@ nx_fw_cmd_create_tx_ctx(struct netxen_adapter *adapter) } memset(rq_addr, 0, rq_size); - prq = (nx_hostrq_tx_ctx_t *)rq_addr; + prq = rq_addr; memset(rsp_addr, 0, rsp_size); - prsp = (nx_cardrsp_tx_ctx_t *)rsp_addr; + prsp = rsp_addr; prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr); @@ -629,7 +629,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) } memset(addr, 0, sizeof(struct netxen_ring_ctx)); - recv_ctx->hwctx = (struct netxen_ring_ctx *)addr; + recv_ctx->hwctx = addr; recv_ctx->hwctx->ctx_id = cpu_to_le32(port); recv_ctx->hwctx->cmd_consumer_offset = cpu_to_le64(recv_ctx->phys_addr + @@ -648,7 +648,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) goto err_out_free; } - tx_ring->desc_head = (struct cmd_desc_type0 *)addr; + tx_ring->desc_head = addr; for (ring = 0; ring < adapter->max_rds_rings; ring++) { rds_ring = &recv_ctx->rds_rings[ring]; @@ -662,7 +662,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) err = -ENOMEM; goto err_out_free; } - rds_ring->desc_head = (struct rcv_desc *)addr; + rds_ring->desc_head = addr; if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) rds_ring->crb_rcv_producer = @@ -683,7 +683,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) err = -ENOMEM; goto err_out_free; } - sds_ring->desc_head = (struct status_desc *)addr; + sds_ring->desc_head = addr; if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { sds_ring->crb_sts_consumer = |