Commit c32773c9 authored by Daode Huang's avatar Daode Huang Committed by David S. Miller

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: default avatarDaode Huang <huangdaode@huawei.com>
Reviewed-by: default avatarCatherine Sullivan <csully@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cbd801b3
...@@ -14,9 +14,9 @@ static void gve_get_drvinfo(struct net_device *netdev, ...@@ -14,9 +14,9 @@ static void gve_get_drvinfo(struct net_device *netdev,
{ {
struct gve_priv *priv = netdev_priv(netdev); struct gve_priv *priv = netdev_priv(netdev);
strlcpy(info->driver, "gve", sizeof(info->driver)); strscpy(info->driver, "gve", sizeof(info->driver));
strlcpy(info->version, gve_version_str, sizeof(info->version)); strscpy(info->version, gve_version_str, sizeof(info->version));
strlcpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info)); strscpy(info->bus_info, pci_name(priv->pdev), sizeof(info->bus_info));
} }
static void gve_set_msglevel(struct net_device *netdev, u32 value) static void gve_set_msglevel(struct net_device *netdev, u32 value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment