提交 34ca9b6e 编写于 作者: L lipeng 提交者: Xie XiuQi

set default value for param "type"

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Feature or Bugfix: Bugfix
Signed-off-by: Nlipeng (Y) <lipeng321@huawei.com>
Reviewed-by: Nshenjian <shenjian15@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 916cb1b5
...@@ -956,6 +956,8 @@ static int hclgevf_bind_ring_to_vector(struct hnae3_handle *handle, bool en, ...@@ -956,6 +956,8 @@ static int hclgevf_bind_ring_to_vector(struct hnae3_handle *handle, bool en,
u8 type; u8 type;
req = (struct hclge_mbx_vf_to_pf_cmd *)desc.data; req = (struct hclge_mbx_vf_to_pf_cmd *)desc.data;
type = en ? HCLGE_MBX_MAP_RING_TO_VECTOR :
HCLGE_MBX_UNMAP_RING_TO_VECTOR;
for (node = ring_chain; node; node = node->next) { for (node = ring_chain; node; node = node->next) {
int idx_offset = HCLGE_MBX_RING_MAP_BASIC_MSG_NUM + int idx_offset = HCLGE_MBX_RING_MAP_BASIC_MSG_NUM +
...@@ -965,9 +967,6 @@ static int hclgevf_bind_ring_to_vector(struct hnae3_handle *handle, bool en, ...@@ -965,9 +967,6 @@ static int hclgevf_bind_ring_to_vector(struct hnae3_handle *handle, bool en,
hclgevf_cmd_setup_basic_desc(&desc, hclgevf_cmd_setup_basic_desc(&desc,
HCLGEVF_OPC_MBX_VF_TO_PF, HCLGEVF_OPC_MBX_VF_TO_PF,
false); false);
type = en ?
HCLGE_MBX_MAP_RING_TO_VECTOR :
HCLGE_MBX_UNMAP_RING_TO_VECTOR;
req->msg[0] = type; req->msg[0] = type;
req->msg[1] = vector_id; req->msg[1] = vector_id;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册