diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:00:11 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-09-19 15:17:05 +0200 |
commit | f2f394db4b5eb1d3e609c93ad85bb4d2d0490121 (patch) | |
tree | 1303aa3cc8255950b95771dac72a3cd4b2e79977 /drivers/hwmon/w83795.c | |
parent | hwmon: (corsair-psu) add reporting of rail mode via debugfs (diff) | |
download | linux-f2f394db4b5eb1d3e609c93ad85bb4d2d0490121.tar.xz linux-f2f394db4b5eb1d3e609c93ad85bb4d2d0490121.zip |
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>
Diffstat (limited to 'drivers/hwmon/w83795.c')
-rw-r--r-- | drivers/hwmon/w83795.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c index 45b12c4287df..be5bb19e9afe 100644 --- a/drivers/hwmon/w83795.c +++ b/drivers/hwmon/w83795.c @@ -1967,7 +1967,7 @@ static int w83795_detect(struct i2c_client *client, else chip_name = "w83795g"; - strlcpy(info->type, chip_name, I2C_NAME_SIZE); + strscpy(info->type, chip_name, I2C_NAME_SIZE); dev_info(&adapter->dev, "Found %s rev. %c at 0x%02hx\n", chip_name, 'A' + (device_id & 0xf), address); |