Skip to contentSkip to conversation

net: qed: Remove unnecessary cast

PATCH Applied Alex Dewar 2 participants 2 messages Aug 20, 2020

Subsystems (3)
lore
Share & tools
lore

Alex Dewar

author
#0 lore raw

PATCH 1/1 net: qed: Remove unnecessary cast

In qed_rdma_destroy_cq() the result of dma_alloc_coherent() is cast from void* unnecessarily. Remove cast.

Issue identified with Coccinelle.

---
 drivers/net/ethernet/qlogic/qed/qed_rdma.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/qlogic/qed/qed_rdma.c +0 -1
index a4bcde522cdf..4394a4d77224 100644
@@ -1151,7 +1151,6 @@ qed_rdma_destroy_cq(void *rdma_cxt,
 	DP_VERBOSE(p_hwfn, QED_MSG_RDMA, "icid = %08x\n", in_params->icid);
 
 	p_ramrod_res =
-	    (struct rdma_destroy_cq_output_params *)
 	    dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
 			       sizeof(struct rdma_destroy_cq_output_params),
 			       &ramrod_res_phys, GFP_KERNEL);
Signature · 1 line
2.28.0
maintainer Applied
#1 lore raw

From: Alex Dewar <[email protected]>
Date: Thu, 20 Aug 2020 18:47:25 +0100

Quoted 6 lines

In qed_rdma_destroy_cq() the result of dma_alloc_coherent() is cast from void* unnecessarily. Remove cast.

Issue identified with Coccinelle.

Applied to net-next, thanks.