Skip to contentSkip to conversation

percpu_counter-use-helper-macro-abs.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 16, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: lib/percpu_counter.c: use helper macro abs()
has been removed from the -mm tree. Its filename was
percpu_counter-use-helper-macro-abs.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Miaohe Lin <[email protected]>
Subject: lib/percpu_counter.c: use helper macro abs()

Use helper macro abs() to simplify the "x >= t || x <= -t" cmp.

---

 lib/percpu_counter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/percpu_counter.c renamed from lib/percpu_counter.c~percpu_counter-use-helper-macro-abs +1 -1
@@ -85,7 +85,7 @@ void percpu_counter_add_batch(struct per
 
 	preempt_disable();
 	count = __this_cpu_read(*fbc->counters) + amount;
-	if (count >= batch || count <= -batch) {
+	if (abs(count) >= batch) {
 		unsigned long flags;
 		raw_spin_lock_irqsave(&fbc->lock, flags);
 		fbc->count += count;

_

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

mm-migrate-avoid-possible-unnecessary-process-right-check-in-kernel_move_pages.patch