summaryrefslogtreecommitdiffstats
path: root/mm/percpu.c
diff options
context:
space:
mode:
authorChristoph Lameter <cl@gentwo.org>2014-06-19 09:59:18 -0500
committerTejun Heo <tj@kernel.org>2014-06-19 11:00:27 -0400
commitfb009e3a998e48fb33436bf9b563c82801a7329c (patch)
treeff9b9ae17a81027a8ff0f44b884c39b30709092f /mm/percpu.c
parent6fbc07bbe2b5a898532f970c5a397f8789ace0d5 (diff)
downloadlinux-stable-fb009e3a998e48fb33436bf9b563c82801a7329c.tar.gz
linux-stable-fb009e3a998e48fb33436bf9b563c82801a7329c.tar.bz2
linux-stable-fb009e3a998e48fb33436bf9b563c82801a7329c.zip
percpu: Use ALIGN macro instead of hand coding alignment calculation
Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'mm/percpu.c')
-rw-r--r--mm/percpu.c3
1 files changed, 1 insertions, 2 deletions
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 "