提交 aca4dc5d 编写于 作者: S Shaozhengchao 提交者: Xie XiuQi

net/hinic: fix review comment

driver inclusion
category:bugfix
bugzilla:4472
CVE:NA

-----------------------------------------------------------------------

fix review comment
Signed-off-by: NShaozhengchao <shaozhengchao@huawei.com>
Reviewed-by: NWangxiaoyun <wangxiaoyun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 33ee8871
......@@ -315,7 +315,7 @@ static int send_msg_to_mgmt_async(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
return -EFAULT;
if (cmd_size > MAX_MSG_SZ)
return -EFAULT;
return -EINVAL;
if (direction == HINIC_MSG_RESPONSE)
prepare_header(pf_to_mgmt, &header, msg_len, mod, HINIC_MSG_ACK,
......@@ -384,7 +384,7 @@ static int send_msg_to_mgmt_sync(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,
return -EFAULT;
if (cmd_size > MAX_MSG_SZ)
return -EFAULT;
return -EINVAL;
if (direction == HINIC_MSG_RESPONSE)
prepare_header(pf_to_mgmt, &header, msg_len, mod, ack_type,
......
......@@ -31,7 +31,7 @@
#include "hinic_nic.h"
#include "hinic_dbg.h"
#define INVALID_PI (65535)
#define INVALID_PI (0xFFFF)
u16 hinic_dbg_get_qp_num(void *hwdev)
{
......@@ -256,8 +256,7 @@ void hinic_get_chip_fault_stats(const void *hwdev,
int copy_len = offset + MAX_DRV_BUF_SIZE - HINIC_CHIP_FAULT_SIZE;
if (offset < 0 || offset > HINIC_CHIP_FAULT_SIZE) {
pr_err("Invalid chip offset value: %d\n",
offset);
pr_err("Invalid chip offset value: %d\n", offset);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册