[dpdk-stable] patch 'net/hinic: fix snprintf length of cable info' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 14:53:44 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From d16cceef30f72e805eee7b4191b4900020740503 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor at redhat.com>
Date: Fri, 6 Mar 2020 12:06:51 +0000
Subject: [PATCH] net/hinic: fix snprintf length of cable info

[ upstream commit 9c84acab47e8eee2736b70edc54f36bb1bc17c57 ]

Correct length and remove unnecessary brackets.

Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")

Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.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 8b16897ade..b6c821a2ad 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -1390,7 +1390,7 @@ 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,
 		 info->cable_length, info->cable_max_speed);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 13:56:20.225173105 +0100
+++ 0034-net-hinic-fix-snprintf-length-of-cable-info.patch	2020-05-19 13:56:18.227501963 +0100
@@ -1,12 +1,13 @@
-From 9c84acab47e8eee2736b70edc54f36bb1bc17c57 Mon Sep 17 00:00:00 2001
+From d16cceef30f72e805eee7b4191b4900020740503 Mon Sep 17 00:00:00 2001
 From: Kevin Traynor <ktraynor at redhat.com>
 Date: Fri, 6 Mar 2020 12:06:51 +0000
 Subject: [PATCH] net/hinic: fix snprintf length of cable info
 
+[ upstream commit 9c84acab47e8eee2736b70edc54f36bb1bc17c57 ]
+
 Correct length and remove unnecessary brackets.
 
 Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")
-Cc: stable at dpdk.org
 
 Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
 Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>


More information about the stable mailing list