提交 e15f16df 编写于 作者: L liaoguojia 提交者: Xie XiuQi

net: hns3: Fix the parameter name of max which should be min

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

Code original meaning to get the min value of two input parameters,
but named as max.Now fix this parameter name.

Patch checking found there were two multple blank lines, so fix it
in this patch.

Feature or Bugfix:Bugfix
Signed-off-by: Nliaoguojia <liaoguojia@huawei.com>
Reviewed-by: Nlipeng <lipeng321@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 d545fbaa
......@@ -1070,7 +1070,6 @@ static int hns3_fill_desc(struct hns3_enet_ring *ring, void *priv,
vflags.inner_vtag = 0;
vflags.out_vtag = 0;
ret = hns3_fill_desc_vtags(skb, ring, &vflags);
return ret;
......
......@@ -927,7 +927,6 @@ struct hclge_dbg_reg_common_msg {
enum hclge_opcode_type cmd;
};
#define HCLGE_DEFAULT_TX_BUF 0x4000 /* 16k bytes */
#define HCLGE_TOTAL_PKT_BUF 0x108000 /* 1.03125M bytes */
#define HCLGE_DEFAULT_DV 0xA000 /* 40k byte */
......
......@@ -63,7 +63,7 @@ static void hclge_dbg_dump_reg_common(struct hclge_dev *hdev,
int bd_num, buf_len;
int ret, i;
int index;
int max;
int min_num;
ret = kstrtouint(cmd_buf, 0, &index);
index = (ret != 0) ? 0 : index;
......@@ -91,10 +91,10 @@ static void hclge_dbg_dump_reg_common(struct hclge_dev *hdev,
entries_per_desc = ARRAY_SIZE(desc->data);
max = (bd_num * entries_per_desc, reg_msg->msg_num);
min_num = min(bd_num * entries_per_desc, reg_msg->msg_num);
desc = desc_src;
for (i = 0; i < max; i++) {
for (i = 0; i < min_num; i++) {
if (i > 0 && (i % entries_per_desc) == 0)
desc++;
if (dfx_message->flag)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册