* + mm-cma-use-str_plural-in-cma_declare_contiguous_multi.patch added to mm-new branch
@ 2025-06-30 23:09 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-06-30 23:09 UTC (permalink / raw)
To: mm-commits, dev.jain, thorsten.blum, akpm
The patch titled
Subject: mm/cma: use str_plural() in cma_declare_contiguous_multi()
has been added to the -mm mm-new branch. Its filename is
mm-cma-use-str_plural-in-cma_declare_contiguous_multi.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-cma-use-str_plural-in-cma_declare_contiguous_multi.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Thorsten Blum <thorsten.blum@linux.dev>
Subject: mm/cma: use str_plural() in cma_declare_contiguous_multi()
Date: Mon, 30 Jun 2025 15:23:18 +0200
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 <thorsten.blum@linux.dev>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Tested-by: Dev Jain <dev.jain@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/cma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/cma.c~mm-cma-use-str_plural-in-cma_declare_contiguous_multi
+++ a/mm/cma.c
@@ -22,6 +22,7 @@
#include <linux/mm.h>
#include <linux/sizes.h>
#include <linux/slab.h>
+#include <linux/string_choices.h>
#include <linux/log2.h>
#include <linux/cma.h>
#include <linux/highmem.h>
@@ -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;
}
_
Patches currently in -mm which might be from thorsten.blum@linux.dev are
mm-hugetlb-use-str_plural-in-report_hugepages.patch
mm-cma-use-str_plural-in-cma_declare_contiguous_multi.patch
alpha-replace-sprintf-strcpy-with-scnprintf-strscpy.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-06-30 23:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 23:09 + mm-cma-use-str_plural-in-cma_declare_contiguous_multi.patch added to mm-new branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.