Skip to contentSkip to conversation

mm-cma-simplify-cma_maxchunk_get.patch removed from -mm tree

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

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: cma: simplify cma_maxchunk_get()
has been removed from the -mm tree. Its filename was
mm-cma-simplify-cma_maxchunk_get.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: Yury Norov (NVIDIA) <[email protected]>
Subject: mm: cma: simplify cma_maxchunk_get()
Date: Sat, 19 Jul 2025 16:54:00 -0400

The function opencodes for_each_clear_bitrange(). Fix that and drop most of housekeeping code.

---

 mm/cma_debug.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
mm/cma_debug.c renamed from mm/cma_debug.c~mm-cma-simplify-cma_maxchunk_get +1 -9
@@ -56,16 +56,8 @@ static int cma_maxchunk_get(void *data,
 	for (r = 0; r < cma->nranges; r++) {
 		cmr = &cma->ranges[r];
 		bitmap_maxno = cma_bitmap_maxno(cma, cmr);
-		end = 0;
-		for (;;) {
-			start = find_next_zero_bit(cmr->bitmap,
-						   bitmap_maxno, end);
-			if (start >= bitmap_maxno)
-				break;
-			end = find_next_bit(cmr->bitmap, bitmap_maxno,
-					    start);
+		for_each_clear_bitrange(start, end, cmr->bitmap, bitmap_maxno)
 			maxchunk = max(end - start, maxchunk);
-		}
 	}
 	spin_unlock_irq(&cma->lock);
 	*val = (u64)maxchunk << cma->order_per_bit;

_

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