From b8db5517fe5265d68abbceb3200fba1aecac4d5f Mon Sep 17 00:00:00 2001 From: Xichao Zhao Date: Mon, 18 Aug 2025 16:24:51 +0800 Subject: [PATCH] PNP: isapnp: use str_plural() to simplify the code Use the string choice helper function str_plural() to simplify the code. Signed-off-by: Xichao Zhao Link: https://patch.msgid.link/20250818082451.497935-1-zhao.xichao@vivo.com Signed-off-by: Rafael J. Wysocki --- drivers/pnp/isapnp/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index d2ff76e74a05..219f96f2aaaf 100644 --- a/drivers/pnp/isapnp/core.c +++ b/drivers/pnp/isapnp/core.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include "../base.h" @@ -1037,7 +1038,7 @@ static int __init isapnp_init(void) if (cards) printk(KERN_INFO "isapnp: %i Plug & Play card%s detected total\n", cards, - cards > 1 ? "s" : ""); + str_plural(cards)); else printk(KERN_INFO "isapnp: No Plug & Play card found\n"); -- 2.20.1