Skip to contentSkip to conversation

lib-min_heap-rename-min_heapify-to-min_heap_sift_down.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Jun 25, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib min_heap: rename min_heapify() to min_heap_sift_down()
has been removed from the -mm tree. Its filename was
lib-min_heap-rename-min_heapify-to-min_heap_sift_down.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: Kuan-Wei Chiu <[email protected]>
Subject: lib min_heap: rename min_heapify() to min_heap_sift_down()
Date: Fri, 24 May 2024 23:29:54 +0800

After adding min_heap_sift_up(), the naming convention has been adjusted to maintain consistency with the min_heap_sift_up(). Consequently, min_heapify() has been renamed to min_heap_sift_down().

Cc Adrian Hunter <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Bagas Sanjaya <[email protected]>
Cc Brian Foster <[email protected]>
Cc Ching-Chun (Jim) Huang <[email protected]>
Cc Coly Li <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Kent Overstreet <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Matthew Sakai <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Randy Dunlap <[email protected]>

---

 drivers/md/dm-vdo/repair.c |    2 +-
 include/linux/min_heap.h   |   14 +++++++-------
 kernel/events/core.c       |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/md/dm-vdo/repair.c renamed from drivers/md/dm-vdo/repair.c~lib-min_heap-rename-min_heapify-to-min_heap_sift_down +1 -1
@@ -183,7 +183,7 @@ static struct numbered_block_mapping *so
 	 */
 	last = &repair->entries[--heap->nr];
 	swap_mappings(heap->data, last, NULL);
-	min_heapify(heap, 0, &repair_min_heap, NULL);
+	min_heap_sift_down(heap, 0, &repair_min_heap, NULL);
 	return last;
 }
 
include/linux/min_heap.h renamed from include/linux/min_heap.h~lib-min_heap-rename-min_heapify-to-min_heap_sift_down +7 -7
@@ -75,7 +75,7 @@ bool __min_heap_full(min_heap_char *heap
 
 /* Sift the element at pos down the heap. */
 static __always_inline
-void __min_heapify(min_heap_char *heap, int pos, size_t elem_size,
+void __min_heap_sift_down(min_heap_char *heap, int pos, size_t elem_size,
 		const struct min_heap_callbacks *func, void *args)
 {
 	void *left, *right;
@@ -108,8 +108,8 @@ void __min_heapify(min_heap_char *heap,
 	}
 }
 
-#define min_heapify(_heap, _pos, _func, _args)	\
-	__min_heapify((min_heap_char *)_heap, _pos, __minheap_obj_size(_heap), _func, _args)
+#define min_heap_sift_down(_heap, _pos, _func, _args)	\
+	__min_heap_sift_down((min_heap_char *)_heap, _pos, __minheap_obj_size(_heap), _func, _args)
 
 /* Sift up ith element from the heap, O(log2(nr)). */
 static __always_inline
@@ -139,7 +139,7 @@ void __min_heapify_all(min_heap_char *he
 	int i;
 
 	for (i = heap->nr / 2 - 1; i >= 0; i--)
-		__min_heapify(heap, i, elem_size, func, args);
+		__min_heap_sift_down(heap, i, elem_size, func, args);
 }
 
 #define min_heapify_all(_heap, _func, _args)	\
@@ -158,7 +158,7 @@ bool __min_heap_pop(min_heap_char *heap,
 	/* Place last element at the root (position 0) and then sift down. */
 	heap->nr--;
 	memcpy(data, data + (heap->nr * elem_size), elem_size);
-	__min_heapify(heap, 0, elem_size, func, args);
+	__min_heap_sift_down(heap, 0, elem_size, func, args);
 
 	return true;
 }
@@ -178,7 +178,7 @@ void __min_heap_pop_push(min_heap_char *
 		void *args)
 {
 	memcpy(heap->data, element, elem_size);
-	__min_heapify(heap, 0, elem_size, func, args);
+	__min_heap_sift_down(heap, 0, elem_size, func, args);
 }
 
 #define min_heap_pop_push(_heap, _element, _func, _args)	\
@@ -232,7 +232,7 @@ bool __min_heap_del(min_heap_char *heap,
 		return true;
 	func->swp(data + (idx * elem_size), data + (heap->nr * elem_size), args);
 	__min_heap_sift_up(heap, elem_size, idx, func, args);
-	__min_heapify(heap, idx, elem_size, func, args);
+	__min_heap_sift_down(heap, idx, elem_size, func, args);
 
 	return true;
 }
kernel/events/core.c renamed from kernel/events/core.c~lib-min_heap-rename-min_heapify-to-min_heap_sift_down +1 -1
@@ -3795,7 +3795,7 @@ static noinline int visit_groups_merge(s
 
 		*evt = perf_event_groups_next(*evt, pmu);
 		if (*evt)
-			min_heapify(&event_heap, 0, &perf_min_heap, NULL);
+			min_heap_sift_down(&event_heap, 0, &perf_min_heap, NULL);
 		else
 			min_heap_pop(&event_heap, &perf_min_heap, NULL);
 	}

_

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