From: Xichao Zhao Date: Mon, 11 Aug 2025 12:23:58 +0000 (+0800) Subject: hpet: Use str_plural() to simplify the code X-Git-Tag: v6.18-rc1~74^2~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c585a4ad322c9aa64263aeb8004a523d0151b1c3;p=thirdparty%2Fkernel%2Flinux.git hpet: 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://lore.kernel.org/r/20250811122358.542190-1-zhao.xichao@vivo.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 0713ea2b2a51c..4f5ccd3a1f566 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -867,7 +867,7 @@ int hpet_alloc(struct hpet_data *hdp) printk(KERN_INFO "hpet%u: at MMIO 0x%lx, IRQ%s", hpetp->hp_which, hdp->hd_phys_address, - hpetp->hp_ntimer > 1 ? "s" : ""); + str_plural(hpetp->hp_ntimer)); for (i = 0; i < hpetp->hp_ntimer; i++) printk(KERN_CONT "%s %u", i > 0 ? "," : "", hdp->hd_irq[i]); printk(KERN_CONT "\n");