summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDaode Huang <huangdaode@huawei.com>2021-03-25 15:56:31 +0800
committerDavid S. Miller <davem@davemloft.net>2021-03-25 17:07:58 -0700
commitc32773c96131fd5a106993efa0078fbde435b2f6 (patch)
tree896fa12f638460738a0301d5c2096cdeb3a50563 /drivers
parentcbd801b3b0716c374e050a8366bb43d71d62b6ec (diff)
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@mail.gmail.com/ Signed-off-by: Daode Huang <huangdaode@huawei.com> Reviewed-by: Catherine Sullivan <csully@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/google/gve/gve_ethtool.c6
1 files 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 0901fa6853ca..e40e052a8566 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)