From: Kevin Traynor <ktraynor@redhat.com>
To: dev@dpdk.org
Cc: Kevin Traynor <ktraynor@redhat.com>,
stable@dpdk.org, xuanziyang2@huawei.com,
cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com
Subject: [dpdk-dev] [PATCH 1/2] net/hinic: fix snprintf length
Date: Fri, 6 Mar 2020 12:00:46 +0000 [thread overview]
Message-ID: <20200306120047.29392-1-ktraynor@redhat.com> (raw)
Correct length and remove unecessary brackets.
Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")
Cc: stable@dpdk.org
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
Cc: xuanziyang2@huawei.com
Cc: cloud.wangxiaoyun@huawei.com
Cc: zhouguoyang@huawei.com
---
drivers/net/hinic/base/hinic_pmd_hwdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index 8b16897ad..b6c821a2a 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -1391,5 +1391,5 @@ static void print_cable_info(struct hinic_link_info *info)
memcpy(tmp_vendor, info->vendor_name, sizeof(info->vendor_name));
- snprintf(tmp_str, (sizeof(tmp_str) - 1),
+ snprintf(tmp_str, sizeof(tmp_str),
"Vendor: %s, %s, %s, length: %um, max_speed: %uGbps",
tmp_vendor, info->sfp_type ? "SFP" : "QSFP", port_type,
--
2.21.1
next reply other threads:[~2020-03-06 12:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 12:00 Kevin Traynor [this message]
2020-03-06 12:00 ` [dpdk-dev] [PATCH 2/2] net/hinic: fix repeating log and length check Kevin Traynor
2020-03-06 12:06 ` [dpdk-dev] [PATCH v2 1/2] net/hinic: fix snprintf length Kevin Traynor
2020-03-06 12:06 ` [dpdk-dev] [PATCH v2 2/2] net/hinic: fix repeating log and length check Kevin Traynor
2020-03-09 16:00 ` [dpdk-dev] [dpdk-stable] [PATCH v2 1/2] net/hinic: fix snprintf length Ferruh Yigit
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=20200306120047.29392-1-ktraynor@redhat.com \
--to=ktraynor@redhat.com \
--cc=cloud.wangxiaoyun@huawei.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=xuanziyang2@huawei.com \
--cc=zhouguoyang@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;
as well as URLs for NNTP newsgroup(s).