Skip to content

Commit 36cb728

Browse files
andy-shevrafaeljw
authored andcommitted
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 <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260317080218.1814693-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 4d613fb commit 36cb728

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/acpi/processor_idle.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,9 +1010,7 @@ static bool combine_lpi_states(struct acpi_lpi_state *local,
10101010
result->arch_flags = parent->arch_flags;
10111011
result->index = parent->index;
10121012

1013-
strscpy(result->desc, local->desc, ACPI_CX_DESC_LEN);
1014-
strlcat(result->desc, "+", ACPI_CX_DESC_LEN);
1015-
strlcat(result->desc, parent->desc, ACPI_CX_DESC_LEN);
1013+
scnprintf(result->desc, ACPI_CX_DESC_LEN, "%s+%s", local->desc, parent->desc);
10161014
return true;
10171015
}
10181016

0 commit comments

Comments
 (0)