lib/percpu_counter: Add missing __percpu qualifier to a cast
Subsystems (3)
PATCH 1/1 lib/percpu_counter: Add missing __percpu qualifier to a cast
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.
Signed-off-by Uros Bizjak <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Dennis Zhou <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Christoph Lameter <[email protected]>
--- lib/percpu_counter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/percpu_counter.c +1 -1
@@ -209,7 +209,7 @@ int __percpu_counter_init_many(struct percpu_counter *fbc, s64 amount,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]); }
Signature · 1 line
2.46.0