summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm63.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2022-08-19 00:00:11 +0300
committerGuenter Roeck <linux@roeck-us.net>2022-09-19 16:17:05 +0300
commitf2f394db4b5eb1d3e609c93ad85bb4d2d0490121 (patch)
tree1303aa3cc8255950b95771dac72a3cd4b2e79977 /drivers/hwmon/lm63.c
parenteb12f54876bb5b7789339610692b70f7f9c925a5 (diff)
downloadlinux-f2f394db4b5eb1d3e609c93ad85bb4d2d0490121.tar.xz
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/lm63.c')
-rw-r--r--drivers/hwmon/lm63.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c
index 339a145afc09..9ab2cab4c710 100644
--- a/drivers/hwmon/lm63.c
+++ b/drivers/hwmon/lm63.c
@@ -996,11 +996,11 @@ static int lm63_detect(struct i2c_client *client,
}
if (chip_id == 0x41 && address == 0x4c)
- strlcpy(info->type, "lm63", I2C_NAME_SIZE);
+ strscpy(info->type, "lm63", I2C_NAME_SIZE);
else if (chip_id == 0x51 && (address == 0x18 || address == 0x4e))
- strlcpy(info->type, "lm64", I2C_NAME_SIZE);
+ strscpy(info->type, "lm64", I2C_NAME_SIZE);
else if (chip_id == 0x49 && address == 0x4c)
- strlcpy(info->type, "lm96163", I2C_NAME_SIZE);
+ strscpy(info->type, "lm96163", I2C_NAME_SIZE);
else
return -ENODEV;