diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/percpu-defs.h | 5 |
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) |