Skip to contentSkip to conversation

mm-hugetlb-use-str_plural-in-report_hugepages.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/hugetlb: use str_plural() in report_hugepages()
has been removed from the -mm tree. Its filename was
mm-hugetlb-use-str_plural-in-report_hugepages.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/hugetlb: use str_plural() in report_hugepages()
Date: Mon, 30 Jun 2025 19:18:26 +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(nrinvalid)

---

 mm/hugetlb.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlb-use-str_plural-in-report_hugepages +2 -1
@@ -25,6 +25,7 @@
 #include <linux/mmdebug.h>
 #include <linux/sched/signal.h>
 #include <linux/rmap.h>
+#include <linux/string_choices.h>
 #include <linux/string_helpers.h>
 #include <linux/swap.h>
 #include <linux/swapops.h>
@@ -3722,7 +3723,7 @@ static void __init report_hugepages(void
 			buf, h->nr_huge_pages);
 		if (nrinvalid)
 			pr_info("HugeTLB: %s page size: %lu invalid page%s discarded\n",
-					buf, nrinvalid, nrinvalid > 1 ? "s" : "");
+					buf, nrinvalid, str_plural(nrinvalid));
 		pr_info("HugeTLB: %d KiB vmemmap can be freed for a %s page\n",
 			hugetlb_vmemmap_optimizable_size(h) / SZ_1K, buf);
 	}

_

Patches currently in -mm which might be from [email protected] are

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