Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb009e3a authored by Christoph Lameter's avatar Christoph Lameter Committed by Tejun Heo
Browse files

percpu: Use ALIGN macro instead of hand coding alignment calculation



Signed-off-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 6fbc07bb
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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 "