percpu: make alloc_percpu() handle array types
authorTejun Heo <tj@kernel.org>
Thu, 29 Oct 2009 13:34:12 +0000 (22:34 +0900)
committerTejun Heo <tj@kernel.org>
Thu, 29 Oct 2009 13:34:12 +0000 (22:34 +0900)
commit64ef291f46d795917f32a0f5975e2b76f6fe206a
treec900fa524230a90f44676212a7dc0349a0cea394
parent3f04ba859597412afbfb31f2fcbe289f2461f9a1
percpu: make alloc_percpu() handle array types

alloc_percpu() couldn't handle array types like "int [100]" due to the
way return type was casted.  Fix it by using typeof() instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
include/linux/percpu.h