From: Daode Huang <huangdaode@huawei.com>
To: <luobin9@huawei.com>, <davem@davemloft.net>, <kuba@kernel.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH net-next 4/4] net: hinic: convert strlcpy to strscpy
Date: Fri, 19 Mar 2021 14:36:25 +0800 [thread overview]
Message-ID: <1616135785-122085-5-git-send-email-huangdaode@huawei.com> (raw)
In-Reply-To: <1616135785-122085-1-git-send-email-huangdaode@huawei.com>
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>
---
drivers/net/ethernet/huawei/hinic/hinic_ethtool.c | 4 ++--
1 file 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 c340d9a..c7848c3 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)
--
2.8.1
next prev parent reply other threads:[~2021-03-19 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 6:36 [PATCH net-next 0/4] net: hinic; make some cleanup for hinic Daode Huang
2021-03-19 6:36 ` [PATCH net-next 1/4] net: hinic: Remove unnecessary 'out of memory' message Daode Huang
2021-03-19 6:36 ` [PATCH net-next 2/4] net: hinic: add a blank line after declarations Daode Huang
2021-03-19 6:36 ` [PATCH net-next 3/4] net: hinic: remove the repeat word "the" in comment Daode Huang
2021-03-19 6:36 ` Daode Huang [this message]
2021-03-19 19:10 ` [PATCH net-next 0/4] net: hinic; make some cleanup for hinic patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1616135785-122085-5-git-send-email-huangdaode@huawei.com \
--to=huangdaode@huawei.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luobin9@huawei.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®