From: Andy Shevchenko Date: Tue, 17 Mar 2026 08:01:06 +0000 (+0100) Subject: ACPI: processor: idle: Replace strlcat() with better alternative X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36cb728754ea4583f145ecacb6e4fb9a6d8e62d6;p=thirdparty%2Fkernel%2Flinux.git ACPI: processor: idle: Replace strlcat() with better alternative strlcpy() and strlcat() are confusing APIs and the former one already gone from the kernel. In preparation to kill strlcat() replace it with the better alternative. Signed-off-by: Andy Shevchenko Link: https://patch.msgid.link/20260317080218.1814693-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 45b5d17443cfb..479995a4c48ab 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -1010,9 +1010,7 @@ static bool combine_lpi_states(struct acpi_lpi_state *local, result->arch_flags = parent->arch_flags; result->index = parent->index; - strscpy(result->desc, local->desc, ACPI_CX_DESC_LEN); - strlcat(result->desc, "+", ACPI_CX_DESC_LEN); - strlcat(result->desc, parent->desc, ACPI_CX_DESC_LEN); + scnprintf(result->desc, ACPI_CX_DESC_LEN, "%s+%s", local->desc, parent->desc); return true; }