aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/surface3_power.c
diff options
context:
space:
mode:
authorWolfram Sang <[email protected]>2022-08-18 21:00:57 +0000
committerHans de Goede <[email protected]>2022-08-26 09:56:56 +0000
commit9c9ac2e659e1b009d16a1f43d8ca26abcf17e0bb (patch)
treef80165d59cc056accca5615df5456715d1a7b2ff /drivers/platform/surface/surface3_power.c
parentplatform/x86: asus-wmi: Fix the name of the mic-mute LED classdev (diff)
downloadkernel-9c9ac2e659e1b009d16a1f43d8ca26abcf17e0bb.tar.gz
kernel-9c9ac2e659e1b009d16a1f43d8ca26abcf17e0bb.zip
platform/x86: 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 <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Reviewed-by: Maximilian Luz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/surface/surface3_power.c')
-rw-r--r--drivers/platform/surface/surface3_power.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/surface/surface3_power.c b/drivers/platform/surface/surface3_power.c
index 444ec81ba02d..4c53d116d59b 100644
--- a/drivers/platform/surface/surface3_power.c
+++ b/drivers/platform/surface/surface3_power.c
@@ -519,7 +519,7 @@ static int mshw0011_probe(struct i2c_client *client)
i2c_set_clientdata(client, data);
memset(&board_info, 0, sizeof(board_info));
- strlcpy(board_info.type, "MSHW0011-bat0", I2C_NAME_SIZE);
+ strscpy(board_info.type, "MSHW0011-bat0", I2C_NAME_SIZE);
bat0 = i2c_acpi_new_device(dev, 1, &board_info);
if (IS_ERR(bat0))