[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250811122240.541469-1-zhao.xichao@vivo.com>
Date: Mon, 11 Aug 2025 20:22:40 +0800
From: Xichao Zhao <zhao.xichao@...o.com>
To: rafael@...nel.org,
robert.moore@...el.com
Cc: lenb@...nel.org,
linux-acpi@...r.kernel.org,
acpica-devel@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Xichao Zhao <zhao.xichao@...o.com>
Subject: [PATCH] ACPICA: Use str_plural() to simplify the code
Use the string choice helper function str_plural() to simplify the code.
Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
---
drivers/acpi/acpica/utpredef.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/acpica/utpredef.c b/drivers/acpi/acpica/utpredef.c
index d9bd80e2d32a..658aeb397111 100644
--- a/drivers/acpi/acpica/utpredef.c
+++ b/drivers/acpi/acpica/utpredef.c
@@ -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.34.1
Powered by blists - more mailing lists