From: Christoph Lameter Date: Thu, 19 Jun 2014 14:59:18 +0000 (-0500) Subject: percpu: Use ALIGN macro instead of hand coding alignment calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb009e3a998e48fb33436bf9b563c82801a7329c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git percpu: Use ALIGN macro instead of hand coding alignment calculation Signed-off-by: Christoph Lameter Signed-off-by: Tejun Heo --- diff --git a/mm/percpu.c b/mm/percpu.c index 2ddf9a990dbd..2139e30a4b44 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -720,8 +720,7 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved) if (unlikely(align < 2)) align = 2; - if (unlikely(size & 1)) - size++; + size = ALIGN(size, 2); if (unlikely(!size || size > PCPU_MIN_UNIT_SIZE || align > PAGE_SIZE)) { WARN(true, "illegal size (%zu) or align (%zu) for "