diff options
author | Joe Perches <joe@perches.com> | 2011-06-16 21:08:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-22 00:48:29 +0200 |
commit | 43d620c82985b19008d87a437b4cf83f356264f7 (patch) | |
tree | 8ea6d9d1ab5d36e7bc130b5189997e12edb01fb6 /drivers/net/qlcnic | |
parent | ixgbe: setup per CPU PCI pool for FCoE DDP (diff) | |
download | linux-43d620c82985b19008d87a437b4cf83f356264f7.tar.xz linux-43d620c82985b19008d87a437b4cf83f356264f7.zip |
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/qlcnic')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ctx.c | 26 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 2 |
4 files changed, 16 insertions, 17 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c index bab041a5c758..c77024f90078 100644 --- a/drivers/net/qlcnic/qlcnic_ctx.c +++ b/drivers/net/qlcnic/qlcnic_ctx.c @@ -126,7 +126,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter) err = -EIO; goto error; } - tmp_tmpl = (struct qlcnic_dump_template_hdr *) tmp_addr; + tmp_tmpl = tmp_addr; csum = qlcnic_temp_checksum((uint32_t *) tmp_addr, temp_size); if (csum) { dev_err(&adapter->pdev->dev, @@ -139,7 +139,7 @@ int qlcnic_fw_cmd_get_minidump_temp(struct qlcnic_adapter *adapter) err = -EIO; goto error; } - tmp_buf = (u32 *) tmp_addr; + tmp_buf = tmp_addr; template = (u32 *) ahw->fw_dump.tmpl_hdr; for (i = 0; i < temp_size/sizeof(u32); i++) *template++ = __le32_to_cpu(*tmp_buf++); @@ -214,7 +214,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter) &hostrq_phys_addr, GFP_KERNEL); if (addr == NULL) return -ENOMEM; - prq = (struct qlcnic_hostrq_rx_ctx *)addr; + prq = addr; addr = dma_alloc_coherent(&adapter->pdev->dev, rsp_size, &cardrsp_phys_addr, GFP_KERNEL); @@ -222,7 +222,7 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter) err = -ENOMEM; goto out_free_rq; } - prsp = (struct qlcnic_cardrsp_rx_ctx *)addr; + prsp = addr; prq->host_rsp_dma_addr = cpu_to_le64(cardrsp_phys_addr); @@ -380,10 +380,10 @@ qlcnic_fw_cmd_create_tx_ctx(struct qlcnic_adapter *adapter) } memset(rq_addr, 0, rq_size); - prq = (struct qlcnic_hostrq_tx_ctx *)rq_addr; + prq = rq_addr; memset(rsp_addr, 0, rsp_size); - prsp = (struct qlcnic_cardrsp_tx_ctx *)rsp_addr; + prsp = rsp_addr; prq->host_rsp_dma_addr = cpu_to_le64(rsp_phys_addr); @@ -493,7 +493,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_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]; @@ -506,7 +506,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter) err = -ENOMEM; goto err_out_free; } - rds_ring->desc_head = (struct rcv_desc *)addr; + rds_ring->desc_head = addr; } @@ -522,7 +522,7 @@ int qlcnic_alloc_hw_resources(struct qlcnic_adapter *adapter) err = -ENOMEM; goto err_out_free; } - sds_ring->desc_head = (struct status_desc *)addr; + sds_ring->desc_head = addr; } return 0; @@ -662,7 +662,7 @@ int qlcnic_get_nic_info(struct qlcnic_adapter *adapter, return -ENOMEM; memset(nic_info_addr, 0, nic_size); - nic_info = (struct qlcnic_info *) nic_info_addr; + nic_info = nic_info_addr; err = qlcnic_issue_cmd(adapter, adapter->ahw->pci_func, adapter->fw_hal_version, @@ -720,7 +720,7 @@ int qlcnic_set_nic_info(struct qlcnic_adapter *adapter, struct qlcnic_info *nic) return -ENOMEM; memset(nic_info_addr, 0, nic_size); - nic_info = (struct qlcnic_info *)nic_info_addr; + nic_info = nic_info_addr; nic_info->pci_func = cpu_to_le16(nic->pci_func); nic_info->op_mode = cpu_to_le16(nic->op_mode); @@ -769,7 +769,7 @@ int qlcnic_get_pci_info(struct qlcnic_adapter *adapter, return -ENOMEM; memset(pci_info_addr, 0, pci_size); - npar = (struct qlcnic_pci_info *) pci_info_addr; + npar = pci_info_addr; err = qlcnic_issue_cmd(adapter, adapter->ahw->pci_func, adapter->fw_hal_version, @@ -877,7 +877,7 @@ int qlcnic_get_port_stats(struct qlcnic_adapter *adapter, const u8 func, QLCNIC_CDRP_CMD_GET_ESWITCH_STATS); if (!err) { - stats = (struct __qlcnic_esw_statistics *)stats_addr; + stats = stats_addr; esw_stats->context_id = le16_to_cpu(stats->context_id); esw_stats->version = le16_to_cpu(stats->version); esw_stats->size = le16_to_cpu(stats->size); diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index 9efc690a289f..8ea800192d5d 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c @@ -996,7 +996,7 @@ qlcnic_get_dump_data(struct net_device *netdev, struct ethtool_dump *dump, /* Copy template header first */ copy_sz = fw_dump->tmpl_hdr->size; hdr_ptr = (u32 *) fw_dump->tmpl_hdr; - data = (u32 *) buffer; + data = buffer; for (i = 0; i < copy_sz/sizeof(u32); i++) *data++ = cpu_to_le32(*hdr_ptr++); diff --git a/drivers/net/qlcnic/qlcnic_hw.c b/drivers/net/qlcnic/qlcnic_hw.c index a5d9fbf9d816..1947f817bf23 100644 --- a/drivers/net/qlcnic/qlcnic_hw.c +++ b/drivers/net/qlcnic/qlcnic_hw.c @@ -1673,8 +1673,7 @@ int qlcnic_dump_fw(struct qlcnic_adapter *adapter) tmpl_hdr->sys_info[1] = adapter->fw_version; for (i = 0; i < no_entries; i++) { - entry = (struct qlcnic_dump_entry *) ((void *) tmpl_hdr + - entry_offset); + entry = (void *)tmpl_hdr + entry_offset; if (!(entry->hdr.mask & tmpl_hdr->drv_cap_mask)) { entry->hdr.flags |= QLCNIC_DUMP_SKIP; entry_offset += entry->hdr.offset; diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 0f6af5c61a7c..347a4a8d1267 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c @@ -1861,7 +1861,7 @@ qlcnic_alloc_lb_filters_mem(struct qlcnic_adapter *adapter) return; adapter->fhash.fmax = QLCNIC_LB_MAX_FILTERS; - adapter->fhash.fhead = (struct hlist_head *)head; + adapter->fhash.fhead = head; for (i = 0; i < adapter->fhash.fmax; i++) INIT_HLIST_HEAD(&adapter->fhash.fhead[i]); |