aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-03 18:18:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-03 18:18:08 -0700
commit96d4e231d25e3d7d8b7a2a9267043eac5d4560a8 (patch)
treecdae128f0b4af234a698c9055108cad32f7f628a /include
parenta9238741987386bb549d61572973c7e62b2a4145 (diff)
parentabec1a806e0c3cf168999667d5fb6218398ef12a (diff)
Merge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Pull single percpu update from Tejun Heo: "Just a single patch to update type verification macro for percpu accessors. Christoph is trying to replace __get_cpu_var() with this_cpu accessors which needs this update. There are still some issues to be resolved but eventually the conversion patches are likely to be routed through different trees, so I think it'd be convenient to merge this commit early" * 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: Make __verify_pcu_ptr handle per cpu pointers to arrays
Diffstat (limited to 'include')
-rw-r--r--include/linux/percpu-defs.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index 27ef6b190ea..57e890abe1f 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -22,9 +22,12 @@
* Macro which verifies @ptr is a percpu pointer without evaluating
* @ptr. This is to be used in percpu accessors to verify that the
* input parameter is a percpu pointer.
+ *
+ * + 0 is required in order to convert the pointer type from a
+ * potential array type to a pointer to a single item of the array.
*/
#define __verify_pcpu_ptr(ptr) do { \
- const void __percpu *__vpp_verify = (typeof(ptr))NULL; \
+ const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
(void)__vpp_verify; \
} while (0)