ACPI: Use str_plural() Function for Argument List Handling
Subsystems (2)
PATCH 1/1 ACPI: Use str_plural() Function for Argument List Handling
This patch enhances acpi_ut_display_predefined_method by using the str_plural() function to handle argument pluralization. It improves readability and maintains consistency in displaying argument counts.
this patch generated using coccinelle.
--- drivers/acpi/acpica/utpredef.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/acpica/utpredef.c +1 -1
@@ -248,7 +248,7 @@ acpi_ut_display_predefined_method(char *buffer,printf ("%4.4s Requires %s%u argument%s" , this_name->info.name, (this_name->info.argument_list &ARG_COUNT_IS_MINIMUM ) ? -"(at least) " :"" , arg_count, arg_count !=1 ?"s" :"" ); +"(at least) " :"" , arg_count,str_plural (arg_count));/* Display the types for any arguments */
Signature · 1 line
2.45.2
Rafael J. Wysocki
maintainerQuoted 6 lines · Prabhakar Pujeri
This patch enhances
acpi_ut_display_predefined_methodby using thestr_plural()function to handle argument pluralization. It improves readability and maintains consistency in displaying argument counts.
Quoted 6 lines
this patch generated using coccinelle.
Signed-off-by Prabhakar Pujeri <[email protected]>--- drivers/acpi/acpica/utpredef.c | 2 +-
ACPICA code changes need to be submitted to the upstream ACPICA project on GitHub. Once accepted there, a Linux patch can be submitted with a Link: tag pointing to the corresponding upstream ACPICA commit.
Quoted 19 lines
1 file changed, 1 insertion(+), 1 deletion(-)drivers/acpi/acpica/utpredef.c +1
-2@@ -248,7 +248,7 @@ acpi_ut_display_predefined_method(char *buffer,printf ("%4.4s Requires %s%u argument%s" , this_name->info.name, (this_name->info.argument_list &ARG_COUNT_IS_MINIMUM ) ? -"(at least) " :"" , arg_count, arg_count !=1 ?"s" :"" ); +"(at least) " :"" , arg_count,str_plural (arg_count));/* Display the types for any arguments */ --2.45.2