diff options
author | Daode Huang <huangdaode@huawei.com> | 2021-03-19 14:36:25 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-19 11:53:17 -0700 |
commit | 79d65cab7f8535d7e19a16651aa45ea674cf4069 (patch) | |
tree | b963709728f3555c83aa14184860c8db56a31203 /drivers/net/ethernet/huawei | |
parent | e2f84fd17557ab3b0e8a2fcc98bc5133ee89a495 (diff) | |
download | linux-79d65cab7f8535d7e19a16651aa45ea674cf4069.tar.bz2 |
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: Daode Huang <huangdaode@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei')
-rw-r--r-- | drivers/net/ethernet/huawei/hinic/hinic_ethtool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c index c340d9acba80..c7848c382a5e 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_ethtool.c @@ -543,8 +543,8 @@ static void hinic_get_drvinfo(struct net_device *netdev, struct hinic_hwif *hwif = hwdev->hwif; int err; - strlcpy(info->driver, HINIC_DRV_NAME, sizeof(info->driver)); - strlcpy(info->bus_info, pci_name(hwif->pdev), sizeof(info->bus_info)); + strscpy(info->driver, HINIC_DRV_NAME, sizeof(info->driver)); + strscpy(info->bus_info, pci_name(hwif->pdev), sizeof(info->bus_info)); err = hinic_get_mgmt_version(nic_dev, mgmt_ver); if (err) |