Skip to contentSkip to conversation

mm-cma-use-str_plural-in-cma_declare_contiguous_multi.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jul 13, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/cma: use str_plural() in cma_declare_contiguous_multi()
has been removed from the -mm tree. Its filename was
mm-cma-use-str_plural-in-cma_declare_contiguous_multi.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Thorsten Blum <[email protected]>
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)

---

 mm/cma.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/cma.c renamed from mm/cma.c~mm-cma-use-str_plural-in-cma_declare_contiguous_multi +2 -2
@@ -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 [email protected] are

mm-memfd-replace-deprecated-strcpy-with-memcpy-in-alloc_name.patch