Commit 5f22a80f authored by Peng Li's avatar Peng Li Committed by David S. Miller

net: hns3: remove redundant param to simplify code

The param msg_q is redundant, copy &req->msg to
hdev->arq.msg_q[hdev->arq.tail] directly makes code clean.
So removes the redundant param msg_q.
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 304cd8e7
...@@ -161,7 +161,6 @@ void hclgevf_mbx_handler(struct hclgevf_dev *hdev) ...@@ -161,7 +161,6 @@ void hclgevf_mbx_handler(struct hclgevf_dev *hdev)
struct hclge_mbx_pf_to_vf_cmd *req; struct hclge_mbx_pf_to_vf_cmd *req;
struct hclgevf_cmq_ring *crq; struct hclgevf_cmq_ring *crq;
struct hclgevf_desc *desc; struct hclgevf_desc *desc;
u16 *msg_q;
u16 flag; u16 flag;
resp = &hdev->mbx_resp; resp = &hdev->mbx_resp;
...@@ -243,8 +242,7 @@ void hclgevf_mbx_handler(struct hclgevf_dev *hdev) ...@@ -243,8 +242,7 @@ void hclgevf_mbx_handler(struct hclgevf_dev *hdev)
} }
/* tail the async message in arq */ /* tail the async message in arq */
msg_q = hdev->arq.msg_q[hdev->arq.tail]; memcpy(hdev->arq.msg_q[hdev->arq.tail], &req->msg,
memcpy(&msg_q[0], &req->msg,
HCLGE_MBX_MAX_ARQ_MSG_SIZE * sizeof(u16)); HCLGE_MBX_MAX_ARQ_MSG_SIZE * sizeof(u16));
hclge_mbx_tail_ptr_move_arq(hdev->arq); hclge_mbx_tail_ptr_move_arq(hdev->arq);
atomic_inc(&hdev->arq.count); atomic_inc(&hdev->arq.count);
......
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