Skip to contentSkip to conversation

lib-percpu_counter-add-missing-__percpu-qualifier-to-a-cast.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Sep 2, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: lib/percpu_counter: add missing __percpu qualifier to a cast
has been removed from the -mm tree. Its filename was
lib-percpu_counter-add-missing-__percpu-qualifier-to-a-cast.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: Uros Bizjak <[email protected]>
Subject: lib/percpu_counter: add missing __percpu qualifier to a cast
Date: Wed, 14 Aug 2024 08:44:13 +0200

Add missing __percpu qualifier to a (void *) cast to fix

percpu_counter.c:212:36: warning: cast removes address space '__percpu' of expression percpu_counter.c:212:33: warning: incorrect type in assignment (different address spaces)
percpu_counter.c:212:33: expected signed int [noderef] [usertype] __percpu *counters
percpu_counter.c:212:33: got void *

sparse warnings.

Found by GCC's named address space checks.

There were no changes in the resulting object file.

---

 lib/percpu_counter.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/percpu_counter.c renamed from lib/percpu_counter.c~lib-percpu_counter-add-missing-__percpu-qualifier-to-a-cast +1 -1
@@ -209,7 +209,7 @@ int __percpu_counter_init_many(struct pe
 		INIT_LIST_HEAD(&fbc[i].list);
 #endif
 		fbc[i].count = amount;
-		fbc[i].counters = (void *)counters + (i * counter_size);
+		fbc[i].counters = (void __percpu *)counters + i * counter_size;
 
 		debug_percpu_counter_activate(&fbc[i]);
 	}

_

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

errh-add-err_ptr_pcpu-ptr_err_pcpu-and-is_err_pcpu-macros.patch mm-kmemleak-use-is_err_pcpu-for-pointer-in-the-percpu-address-space.patch squashfs-fix-percpu-address-space-issues-in-decompressor_multi_percpuc.patch