commit | f2f394db4b5eb1d3e609c93ad85bb4d2d0490121 | [log] [tgz] |
---|---|---|
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | Thu Aug 18 23:00:11 2022 +0200 |
committer | Guenter Roeck <linux@roeck-us.net> | Mon Sep 19 06:17:05 2022 -0700 |
tree | 1303aa3cc8255950b95771dac72a3cd4b2e79977 | |
parent | eb12f54876bb5b7789339610692b70f7f9c925a5 [diff] [blame] |
hwmon: 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> Link: https://lore.kernel.org/r/20220818210014.6769-1-wsa+renesas@sang-engineering.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
diff --git a/drivers/hwmon/adm1025.c b/drivers/hwmon/adm1025.c index 4352f6a..2984c4f 100644 --- a/drivers/hwmon/adm1025.c +++ b/drivers/hwmon/adm1025.c
@@ -470,7 +470,7 @@ static int adm1025_detect(struct i2c_client *client, else return -ENODEV; - strlcpy(info->type, name, I2C_NAME_SIZE); + strscpy(info->type, name, I2C_NAME_SIZE); return 0; }