Skip to content

Commit 74ef070

Browse files
ubizjakakpm00
authored andcommitted
percpu: merge VERIFY_PERCPU_PTR() into its only user
Merge VERIFY_PERCPU_PTR() into non-CONFIG_SMP per_cpu_ptr() to make macro similar to CONFIG_SMP per_cpu_ptr(). This will allow a follow-up patch to refactor common code to a macro. No functional changes, non-CONFIG_SMP per_cpu_ptr() was the only user of VERIFY_PERCPU_PTR(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Uros Bizjak <[email protected]> Acked-by: Christoph Lameter <[email protected]> Cc: Dennis Zhou <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 8f0d91f commit 74ef070

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/linux/percpu-defs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@ do { \
254254

255255
#else /* CONFIG_SMP */
256256

257-
#define VERIFY_PERCPU_PTR(__p) \
257+
#define per_cpu_ptr(ptr, cpu) \
258258
({ \
259-
__verify_pcpu_ptr(__p); \
260-
(typeof(*(__p)) __kernel __force *)(__p); \
259+
(void)(cpu); \
260+
__verify_pcpu_ptr(ptr); \
261+
(typeof(*(ptr)) __kernel __force *)(ptr); \
261262
})
262263

263-
#define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
264264
#define raw_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
265265
#define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
266266

0 commit comments

Comments
 (0)