提交 254f1b4f 编写于 作者: G Guangbin Huang 提交者: Zheng Zengkai

net: hns3: modify one argument type of function hclge_ncl_config_data_print

mainline inclusion
from mainline-master
commit 72dcdec1
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4M1HB
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=72dcdec10fad

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

The argument len will not be changed in hclge_ncl_config_data_print(), it
is no need to declare as a pointer, so modify it into int type.
Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Reviewed-by: NYongxin Li <liyongxin1@huawei.com>
Signed-off-by: NJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b07f31cf
...@@ -1764,7 +1764,7 @@ hclge_dbg_get_imp_stats_info(struct hclge_dev *hdev, char *buf, int len) ...@@ -1764,7 +1764,7 @@ hclge_dbg_get_imp_stats_info(struct hclge_dev *hdev, char *buf, int len)
#define HCLGE_MAX_NCL_CONFIG_LENGTH 16384 #define HCLGE_MAX_NCL_CONFIG_LENGTH 16384
static void hclge_ncl_config_data_print(struct hclge_desc *desc, int *index, static void hclge_ncl_config_data_print(struct hclge_desc *desc, int *index,
char *buf, int *len, int *pos) char *buf, int len, int *pos)
{ {
#define HCLGE_CMD_DATA_NUM 6 #define HCLGE_CMD_DATA_NUM 6
...@@ -1776,7 +1776,7 @@ static void hclge_ncl_config_data_print(struct hclge_desc *desc, int *index, ...@@ -1776,7 +1776,7 @@ static void hclge_ncl_config_data_print(struct hclge_desc *desc, int *index,
if (i == 0 && j == 0) if (i == 0 && j == 0)
continue; continue;
*pos += scnprintf(buf + *pos, *len - *pos, *pos += scnprintf(buf + *pos, len - *pos,
"0x%04x | 0x%08x\n", offset, "0x%04x | 0x%08x\n", offset,
le32_to_cpu(desc[i].data[j])); le32_to_cpu(desc[i].data[j]));
...@@ -1814,7 +1814,7 @@ hclge_dbg_dump_ncl_config(struct hclge_dev *hdev, char *buf, int len) ...@@ -1814,7 +1814,7 @@ hclge_dbg_dump_ncl_config(struct hclge_dev *hdev, char *buf, int len)
if (ret) if (ret)
return ret; return ret;
hclge_ncl_config_data_print(desc, &index, buf, &len, &pos); hclge_ncl_config_data_print(desc, &index, buf, len, &pos);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册