Commit 96d4e231d25e3d7d8b7a2a9267043eac5d4560a8

Authored by Linus Torvalds

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

Showing 1 changed file Side-by-side Diff

include/linux/percpu-defs.h
... ... @@ -22,9 +22,12 @@
22 22 * Macro which verifies @ptr is a percpu pointer without evaluating
23 23 * @ptr. This is to be used in percpu accessors to verify that the
24 24 * input parameter is a percpu pointer.
  25 + *
  26 + * + 0 is required in order to convert the pointer type from a
  27 + * potential array type to a pointer to a single item of the array.
25 28 */
26 29 #define __verify_pcpu_ptr(ptr) do { \
27   - const void __percpu *__vpp_verify = (typeof(ptr))NULL; \
  30 + const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL; \
28 31 (void)__vpp_verify; \
29 32 } while (0)
30 33