Commit 745e5ad5 authored by Aishwarya Ramakrishnan's avatar Aishwarya Ramakrishnan Committed by David S. Miller

net: qed: Remove unneeded cast from memory allocation

Remove casting the values returned by memory allocation function.

Coccinelle emits WARNING: casting value returned by memory allocation
function to struct pointer is useless.

This issue was detected by using the Coccinelle.
Signed-off-by: default avatarAishwarya Ramakrishnan <aishwaryarj100@gmail.com>
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5333fdbe
...@@ -736,8 +736,8 @@ static int qed_roce_sp_destroy_qp_responder(struct qed_hwfn *p_hwfn, ...@@ -736,8 +736,8 @@ static int qed_roce_sp_destroy_qp_responder(struct qed_hwfn *p_hwfn,
p_ramrod = &p_ent->ramrod.roce_destroy_qp_resp; p_ramrod = &p_ent->ramrod.roce_destroy_qp_resp;
p_ramrod_res = (struct roce_destroy_qp_resp_output_params *) p_ramrod_res = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, sizeof(*p_ramrod_res), sizeof(*p_ramrod_res),
&ramrod_res_phys, GFP_KERNEL); &ramrod_res_phys, GFP_KERNEL);
if (!p_ramrod_res) { if (!p_ramrod_res) {
...@@ -872,7 +872,7 @@ int qed_roce_query_qp(struct qed_hwfn *p_hwfn, ...@@ -872,7 +872,7 @@ int qed_roce_query_qp(struct qed_hwfn *p_hwfn,
} }
/* Send a query responder ramrod to FW to get RQ-PSN and state */ /* Send a query responder ramrod to FW to get RQ-PSN and state */
p_resp_ramrod_res = (struct roce_query_qp_resp_output_params *) p_resp_ramrod_res =
dma_alloc_coherent(&p_hwfn->cdev->pdev->dev, dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
sizeof(*p_resp_ramrod_res), sizeof(*p_resp_ramrod_res),
&resp_ramrod_res_phys, GFP_KERNEL); &resp_ramrod_res_phys, GFP_KERNEL);
...@@ -920,8 +920,7 @@ int qed_roce_query_qp(struct qed_hwfn *p_hwfn, ...@@ -920,8 +920,7 @@ int qed_roce_query_qp(struct qed_hwfn *p_hwfn,
} }
/* Send a query requester ramrod to FW to get SQ-PSN and state */ /* Send a query requester ramrod to FW to get SQ-PSN and state */
p_req_ramrod_res = (struct roce_query_qp_req_output_params *) p_req_ramrod_res = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,
sizeof(*p_req_ramrod_res), sizeof(*p_req_ramrod_res),
&req_ramrod_res_phys, &req_ramrod_res_phys,
GFP_KERNEL); GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment