]> git.baikalelectronics.ru Git - kernel.git/commit
mm/page_alloc.c: simplify calculation of combined index of adjacent buddy lists
authorKyongHo Cho <pullip.cho@samsung.com>
Thu, 13 Jan 2011 23:47:24 +0000 (15:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jan 2011 01:32:48 +0000 (17:32 -0800)
commita8e1cc7e5db59d0ba1695a6e2c30d5b4d4403810
treeb594f240a780e3547341530fedabb6ac4735ff41
parent7c8b10689a277270fcb054ad7ab17353770c894a
mm/page_alloc.c: simplify calculation of combined index of adjacent buddy lists

The previous approach of calucation of combined index was

page_idx & ~(1 << order))

but we have same result with

page_idx & buddy_idx

This reduces instructions slightly as well as enhances readability.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix used-unintialised warning]
Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c