From: Xichao Zhao Date: Mon, 18 Aug 2025 08:24:51 +0000 (+0800) Subject: PNP: isapnp: use str_plural() to simplify the code X-Git-Tag: v6.18-rc1~151^2^4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8db5517fe5265d68abbceb3200fba1aecac4d5f;p=thirdparty%2Fkernel%2Fstable.git 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 --- diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c index d2ff76e74a055..219f96f2aaaf4 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");