From: Jijie Shao <shaojijie@huawei.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>
Cc: <shaojijie@huawei.com>, <yisen.zhuang@huawei.com>,
<salil.mehta@huawei.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<jiri@resnulli.us>, <shenjian15@huawei.com>,
<wangjie125@huawei.com>, <liuyonglong@huawei.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V5 net-next 3/4] net: hns3: dump more reg info based on ras mod
Date: Tue, 12 Mar 2024 11:42:55 +0800 [thread overview]
Message-ID: <b9b04261-a6e8-4dae-9b41-3b8045811a74@huawei.com> (raw)
In-Reply-To: <20240312030303.GA1249254@maili.marvell.com>
on 2024/3/12 11:03, Ratheesh Kannoth wrote:
> On 2024-03-09 at 15:30:43, Jijie Shao (shaojijie@huawei.com) wrote:
>> + }
>> +
>> + pos = scnprintf(buf, HCLGE_MOD_REG_INFO_LEN_MAX, "%s",
>> + reg_info[i].reg_name);
>> + if (reg_info[i].has_suffix)
>> + pos += scnprintf(buf + pos,
>> + HCLGE_MOD_REG_INFO_LEN_MAX - pos, "%u",
>> + le32_to_cpu(desc->data[0]));
>> + pos += scnprintf(buf + pos,
>> + HCLGE_MOD_REG_INFO_LEN_MAX - pos,
>> + ":");
>> + for (j = 0; j < reg_info[i].group_size; j++) {
>> + offset = reg_info[i].reg_offset_group[j];
>> + index = offset % HCLGE_DESC_DATA_LEN;
>> + bd_idx = offset / HCLGE_DESC_DATA_LEN;
>> + pos += scnprintf(buf + pos,
>> + HCLGE_MOD_REG_INFO_LEN_MAX - pos,
>> + " %08x",
>> + le32_to_cpu(desc[bd_idx].data[index]));
>> + }
>> + buf[pos] = '\0';
> ASFAIK, scnprintf does null terminate the string.
Yeah, you're right. I will send v6 to delete it
next prev parent reply other threads:[~2024-03-12 3:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 10:00 [PATCH V5 net-next 0/4] Support some features for the HNS3 ethernet driver Jijie Shao
2024-03-09 10:00 ` [PATCH V5 net-next 1/4] net: hns3: add command queue trace for hns3 Jijie Shao
2024-03-09 10:00 ` [PATCH V5 net-next 2/4] net: hns3: move constants from hclge_debugfs.h to hclge_debugfs.c Jijie Shao
2024-03-09 10:00 ` [PATCH V5 net-next 3/4] net: hns3: dump more reg info based on ras mod Jijie Shao
2024-03-12 3:03 ` Ratheesh Kannoth
2024-03-12 3:42 ` Jijie Shao [this message]
2024-03-09 10:00 ` [PATCH V5 net-next 4/4] net: hns3: add support to query scc version by devlink info Jijie Shao
2024-03-11 9:19 ` Simon Horman
2024-03-11 9:55 ` Jijie Shao
2024-03-12 4:29 ` [PATCH V5 net-next 0/4] Support some features for the HNS3 ethernet driver Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b9b04261-a6e8-4dae-9b41-3b8045811a74@huawei.com \
--to=shaojijie@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuyonglong@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=salil.mehta@huawei.com \
--cc=shenjian15@huawei.com \
--cc=wangjie125@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®