[merged mm-nonmm-stable] lib-interval_tree-fix-allocation-warning-messages.patch removed from -mm tree

Andrew Morton <[email protected]>
Newsgroups org.kernel.vger.mm-commits
Message-ID <[email protected]>
The quilt patch titled
     Subject: lib/interval_tree: fix allocation warning messages
has been removed from the -mm tree.  Its filename was
     lib-interval_tree-fix-allocation-warning-messages.patch

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

------------------------------------------------------
From: Karl Mehltretter <[email protected]>
Subject: lib/interval_tree: fix allocation warning messages
Date: Sat, 8 Aug 2026 14:36:08 +0200

WARN_ON_ONCE() takes a condition, not a message.  The string literals are
always true, so the warnings still trigger but the messages are never
printed.

Use WARN_ONCE(1, ...) instead to print the messages and keep the once-only
behavior.

Found with a Coccinelle script.  Clang's -Wstring-conversion also flags
such calls but is not enabled in kernel builds.

Link: https://lore.kernel.org/[email protected]
Fixes: 82114e45131f ("lib/interval_tree: add test case for interval_tree_iter_xxx() helpers")
Assisted-by: Claude:claude-fable-5 coccinelle
Signed-off-by: Karl Mehltretter <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Reviewed-by: Wei Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 lib/interval_tree_test.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/lib/interval_tree_test.c~lib-interval_tree-fix-allocation-warning-messages
+++ a/lib/interval_tree_test.c
@@ -140,13 +140,13 @@ static int intersection_range_check(void
 
 	intxn1 = bitmap_alloc(nnodes, GFP_KERNEL);
 	if (!intxn1) {
-		WARN_ON_ONCE("Failed to allocate intxn1\n");
+		WARN_ONCE(1, "Failed to allocate intxn1\n");
 		return -ENOMEM;
 	}
 
 	intxn2 = bitmap_alloc(nnodes, GFP_KERNEL);
 	if (!intxn2) {
-		WARN_ON_ONCE("Failed to allocate intxn2\n");
+		WARN_ONCE(1, "Failed to allocate intxn2\n");
 		bitmap_free(intxn1);
 		return -ENOMEM;
 	}
_

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

selftests-proc-make-proc-maps-race-work-with-read_implies_exec.patch
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.