Michal Suchanek 3734d3
From 8a96c80e2774172c6a091b5d40579fe957228393 Mon Sep 17 00:00:00 2001
Michal Suchanek 3734d3
From: Lijun Pan <lijunp213@gmail.com>
Michal Suchanek 3734d3
Date: Thu, 11 Feb 2021 00:43:25 -0600
Michal Suchanek 3734d3
Subject: [PATCH] ibmvnic: prefer strscpy over strlcpy
Michal Suchanek 3734d3
Michal Suchanek 3734d3
References: bsc#1184114 ltc#192237 bsc#1183871 ltc#192139
Michal Suchanek 3734d3
Patch-mainline: v5.12-rc1
Michal Suchanek 3734d3
Git-commit: 8a96c80e2774172c6a091b5d40579fe957228393
Michal Suchanek 3734d3
Michal Suchanek 3734d3
Fix this warning:
Michal Suchanek 3734d3
WARNING: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Michal Suchanek 3734d3
Michal Suchanek 3734d3
Signed-off-by: Lijun Pan <lijunp213@gmail.com>
Michal Suchanek 3734d3
Signed-off-by: David S. Miller <davem@davemloft.net>
Michal Suchanek 3734d3
Acked-by: Michal Suchanek <msuchanek@suse.de>
Michal Suchanek 3734d3
---
Michal Suchanek 3734d3
 drivers/net/ethernet/ibm/ibmvnic.c | 6 +++---
Michal Suchanek 3734d3
 1 file changed, 3 insertions(+), 3 deletions(-)
Michal Suchanek 3734d3
Michal Suchanek 3734d3
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
Michal Suchanek 3734d3
index 778e56e05cd7..1774fbaab146 100644
Michal Suchanek 3734d3
--- a/drivers/net/ethernet/ibm/ibmvnic.c
Michal Suchanek 3734d3
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
Michal Suchanek 3734d3
@@ -2633,9 +2633,9 @@ static void ibmvnic_get_drvinfo(struct net_device *netdev,
Michal Suchanek 3734d3
 {
Michal Suchanek 3734d3
 	struct ibmvnic_adapter *adapter = netdev_priv(netdev);
Michal Suchanek 3734d3
 
Michal Suchanek 3734d3
-	strlcpy(info->driver, ibmvnic_driver_name, sizeof(info->driver));
Michal Suchanek 3734d3
-	strlcpy(info->version, IBMVNIC_DRIVER_VERSION, sizeof(info->version));
Michal Suchanek 3734d3
-	strlcpy(info->fw_version, adapter->fw_version,
Michal Suchanek 3734d3
+	strscpy(info->driver, ibmvnic_driver_name, sizeof(info->driver));
Michal Suchanek 3734d3
+	strscpy(info->version, IBMVNIC_DRIVER_VERSION, sizeof(info->version));
Michal Suchanek 3734d3
+	strscpy(info->fw_version, adapter->fw_version,
Michal Suchanek 3734d3
 		sizeof(info->fw_version));
Michal Suchanek 3734d3
 }
Michal Suchanek 3734d3
 
Michal Suchanek 3734d3
-- 
Michal Suchanek 3734d3
2.26.2
Michal Suchanek 3734d3