[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1616658992-135804-2-git-send-email-huangdaode@huawei.com>
Date: Thu, 25 Mar 2021 15:56:31 +0800
From: Daode Huang <huangdaode@...wei.com>
To: <csully@...gle.com>, <sagis@...gle.com>, <jonolson@...gle.com>,
<davem@...emloft.net>, <kuba@...nel.org>, <awogbemila@...gle.com>,
<yangchun@...gle.com>, <kuozhao@...gle.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH net-next 1/2] net: gve: convert strlcpy to strscpy
Usage of strlcpy in linux kernel has been recently deprecated[1], so
convert gve driver to strscpy
[1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL
=V6A6G1oUZcprmknw@...l.gmail.com/
Signed-off-by: Daode Huang <huangdaode@...wei.com>
---
drivers/net/ethernet/google/gve/gve_ethtool.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/google/gve/gve_ethtool.c b/drivers/net/ethernet/google/gve/gve_ethtool.c
index 0901fa6..e40e052 100644
--- a/drivers/net/ethernet/google/gve/gve_ethtool.c
+++ b/drivers/net/ethernet/google/gve/gve_ethtool.c
@@ -14,9 +14,9 @@ static void gve_get_drvinfo(struct net_device *netdev,
{
struct gve_priv *priv = netdev_priv(netdev);
- strlcpy(info->driver, "gve", sizeof(info->driver));
- strlcpy(info->version, gve_version_str, sizeof(info->version));
- strlcpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
+ strscpy(info->driver, "gve", sizeof(info->driver));
+ strscpy(info->version, gve_version_str, sizeof(info->version));
+ strscpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
}
static void gve_set_msglevel(struct net_device *netdev, u32 value)
--
2.8.1
Powered by blists - more mailing lists