X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fasm-generic%2Fpercpu.h;h=04f91c2d3f7b93d88011236b07aa1f71d2a39def;hb=26c0c75e69265961e891ed80b38fb62a548ab371;hp=ca6f0491412bdbe98270db4df5a8204df920f02a;hpb=dd17c8f72993f9461e9c19250e3f155d6d99df22;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index ca6f049..04f91c2 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h @@ -41,7 +41,11 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; * Only S390 provides its own means of moving the pointer. */ #ifndef SHIFT_PERCPU_PTR -#define SHIFT_PERCPU_PTR(__p, __offset) RELOC_HIDE((__p), (__offset)) +/* Weird cast keeps both GCC and sparse happy. */ +#define SHIFT_PERCPU_PTR(__p, __offset) ({ \ + __verify_pcpu_ptr((__p)); \ + RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \ +}) #endif /*