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

net: hinic: convert strlcpy to strscpy

Usage of strlcpy in linux kernel has been recently
deprecated[1], so convert hinic 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>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2f84fd1
...@@ -543,8 +543,8 @@ static void hinic_get_drvinfo(struct net_device *netdev, ...@@ -543,8 +543,8 @@ static void hinic_get_drvinfo(struct net_device *netdev,
struct hinic_hwif *hwif = hwdev->hwif; struct hinic_hwif *hwif = hwdev->hwif;
int err; int err;
strlcpy(info->driver, HINIC_DRV_NAME, sizeof(info->driver)); strscpy(info->driver, HINIC_DRV_NAME, sizeof(info->driver));
strlcpy(info->bus_info, pci_name(hwif->pdev), sizeof(info->bus_info)); strscpy(info->bus_info, pci_name(hwif->pdev), sizeof(info->bus_info));
err = hinic_get_mgmt_version(nic_dev, mgmt_ver); err = hinic_get_mgmt_version(nic_dev, mgmt_ver);
if (err) if (err)
......
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