summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/bcm-phy-lib.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-08-30 22:14:52 +0200
committerJakub Kicinski <kuba@kernel.org>2022-08-31 14:11:07 -0700
commitfb3ceec187e8bca474340e361a18163a2e79c0a2 (patch)
tree1c654fd696ed34dfa8aeca4fff95871c7c28ee17 /drivers/net/phy/bcm-phy-lib.c
parent8af1a9afe10005088f25f6c4c5b6e3eeaade6a93 (diff)
downloadlinux-stable-fb3ceec187e8bca474340e361a18163a2e79c0a2.tar.gz
linux-stable-fb3ceec187e8bca474340e361a18163a2e79c0a2.tar.bz2
linux-stable-fb3ceec187e8bca474340e361a18163a2e79c0a2.zip
net: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> # for CAN Link: https://lore.kernel.org/r/20220830201457.7984-1-wsa+renesas@sang-engineering.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy/bcm-phy-lib.c')
-rw-r--r--drivers/net/phy/bcm-phy-lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/bcm-phy-lib.c b/drivers/net/phy/bcm-phy-lib.c
index 287cccf8f7f4..b2c0baa51f39 100644
--- a/drivers/net/phy/bcm-phy-lib.c
+++ b/drivers/net/phy/bcm-phy-lib.c
@@ -519,7 +519,7 @@ void bcm_phy_get_strings(struct phy_device *phydev, u8 *data)
unsigned int i;
for (i = 0; i < ARRAY_SIZE(bcm_phy_hw_stats); i++)
- strlcpy(data + i * ETH_GSTRING_LEN,
+ strscpy(data + i * ETH_GSTRING_LEN,
bcm_phy_hw_stats[i].string, ETH_GSTRING_LEN);
}
EXPORT_SYMBOL_GPL(bcm_phy_get_strings);