From: Andy Shevchenko Date: Sun, 2 Jun 2024 08:58:00 +0000 (+0300) Subject: platform/x86: touchscreen_dmi: Use 2-argument strscpy() X-Git-Tag: for-6.11/io_uring-20240710~79^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=55624db051c8bdd39acbb1f35774c3f7b97c07b8;p=linux-block.git platform/x86: touchscreen_dmi: Use 2-argument strscpy() Use 2-argument strscpy(), which is not only shorter but also provides an additional check that destination buffer is an array. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240602090244.1666360-8-andy.shevchenko@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede --- diff --git a/drivers/platform/x86/touchscreen_dmi.c b/drivers/platform/x86/touchscreen_dmi.c index 3f626584f2c3..f74af0a689f2 100644 --- a/drivers/platform/x86/touchscreen_dmi.c +++ b/drivers/platform/x86/touchscreen_dmi.c @@ -1850,7 +1850,7 @@ static int __init ts_parse_props(char *str) u32 u32val; int i, ret; - strscpy(orig_str, str, sizeof(orig_str)); + strscpy(orig_str, str); /* * str is part of the static_command_line from init/main.c and poking