From: Thorsten Blum Date: Mon, 30 Jun 2025 13:23:18 +0000 (+0200) Subject: mm/cma: use str_plural() in cma_declare_contiguous_multi() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11f45931ccfd14f2f3ca3cf9cafd0e9317e9008a;p=thirdparty%2Fkernel%2Flinux.git mm/cma: use str_plural() in cma_declare_contiguous_multi() Use the string choice helper function str_plural() to simplify the code and to fix the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_plural(nr) Link: https://lkml.kernel.org/r/20250630132318.41339-2-thorsten.blum@linux.dev Signed-off-by: Thorsten Blum Reviewed-by: Dev Jain Tested-by: Dev Jain Reviewed-by: Anshuman Khandual Acked-by: David Hildenbrand Signed-off-by: Andrew Morton --- diff --git a/mm/cma.c b/mm/cma.c index c0b2630a1b81a..c40d532988016 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -548,8 +549,7 @@ out: (unsigned long)total_size / SZ_1M); else pr_info("Reserved %lu MiB in %d range%s\n", - (unsigned long)total_size / SZ_1M, nr, - nr > 1 ? "s" : ""); + (unsigned long)total_size / SZ_1M, nr, str_plural(nr)); return ret; }