diff --git a/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c b/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c index 119155b8a158bd84b1ccd3286247457b224beb57..1afbdb1f9f25fab4d22a8b59bb17fc448cd8f3d9 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_mgmt.c @@ -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, diff --git a/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c b/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c index 35135e5274cafc28edf15412c9d9f107472b6401..ab47805ca369ddd56df9a46749929c5ac2ec6969 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_nic_dbg.c @@ -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; }