Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <zhao.xichao@vivo.com>
Link: https://patch.msgid.link/20250818082451.497935-1-zhao.xichao@vivo.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Xichao Zhao and committed by
Rafael J. Wysocki
b8db5517 1b237f19

+2 -1
+2 -1
drivers/pnp/isapnp/core.c
··· 27 27 #include <linux/init.h> 28 28 #include <linux/isapnp.h> 29 29 #include <linux/mutex.h> 30 + #include <linux/string_choices.h> 30 31 #include <asm/io.h> 31 32 32 33 #include "../base.h" ··· 1038 1037 if (cards) 1039 1038 printk(KERN_INFO 1040 1039 "isapnp: %i Plug & Play card%s detected total\n", cards, 1041 - cards > 1 ? "s" : ""); 1040 + str_plural(cards)); 1042 1041 else 1043 1042 printk(KERN_INFO "isapnp: No Plug & Play card found\n"); 1044 1043