diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:00:29 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2022-09-28 16:17:39 +0100 |
commit | 6a32d3995f7bcf04598548778da54d2b6932b6a5 (patch) | |
tree | bdf35f7612b615b9555e6fbe670c0805cdc1b46b /drivers/mfd/mfd-core.c | |
parent | 75db7907355ca5e2ff606e9dd3e86b6c3a455fe2 (diff) | |
download | lwn-6a32d3995f7bcf04598548778da54d2b6932b6a5.tar.gz lwn-6a32d3995f7bcf04598548778da54d2b6932b6a5.zip |
mfd: 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>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220818210030.7012-1-wsa+renesas@sang-engineering.com
Diffstat (limited to 'drivers/mfd/mfd-core.c')
-rw-r--r-- | drivers/mfd/mfd-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 5ec5d76a667d..16d1861e9682 100644 --- a/drivers/mfd/mfd-core.c +++ b/drivers/mfd/mfd-core.c @@ -105,7 +105,7 @@ static void mfd_acpi_add_device(const struct mfd_cell *cell, .ids = ids, }; - strlcpy(ids[0].id, match->pnpid, sizeof(ids[0].id)); + strscpy(ids[0].id, match->pnpid, sizeof(ids[0].id)); acpi_dev_for_each_child(parent, match_device_ids, &wd); adev = wd.adev; } else { |