Commit eb55323c authored by Huazhong Tan's avatar Huazhong Tan Committed by David S. Miller

net: hns3: remove useless code in hclge_cmd_send

There are some useless type cast, print in hclge_cmd_send.
This patch removes them.
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5411b984
...@@ -269,19 +269,17 @@ int hclge_cmd_send(struct hclge_hw *hw, struct hclge_desc *desc, int num) ...@@ -269,19 +269,17 @@ int hclge_cmd_send(struct hclge_hw *hw, struct hclge_desc *desc, int num)
/* Get the result of hardware write back */ /* Get the result of hardware write back */
desc_to_use = &hw->cmq.csq.desc[ntc]; desc_to_use = &hw->cmq.csq.desc[ntc];
desc[handle] = *desc_to_use; desc[handle] = *desc_to_use;
pr_debug("Get cmd desc:\n");
if (likely(!hclge_is_special_opcode(opcode))) if (likely(!hclge_is_special_opcode(opcode)))
desc_ret = le16_to_cpu(desc[handle].retval); desc_ret = le16_to_cpu(desc[handle].retval);
else else
desc_ret = le16_to_cpu(desc[0].retval); desc_ret = le16_to_cpu(desc[0].retval);
if ((enum hclge_cmd_return_status)desc_ret == if (desc_ret == HCLGE_CMD_EXEC_SUCCESS)
HCLGE_CMD_EXEC_SUCCESS)
retval = 0; retval = 0;
else else
retval = -EIO; retval = -EIO;
hw->cmq.last_status = (enum hclge_cmd_status)desc_ret; hw->cmq.last_status = desc_ret;
ntc++; ntc++;
handle++; handle++;
if (ntc == hw->cmq.csq.desc_num) if (ntc == hw->cmq.csq.desc_num)
......
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