Skip to content

Commit

Permalink
percpu: Use ALIGN macro instead of hand coding alignment calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Lameter <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
  • Loading branch information
Christoph Lameter authored and htejun committed Jun 19, 2014
1 parent 6fbc07b commit fb009e3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit fb009e3

Please sign in to comment.