hugetlb: add an inline helper for finding hstate index
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 31 Jul 2012 23:42:00 +0000 (16:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Aug 2012 01:42:40 +0000 (18:42 -0700)
commit972dc4de13f667a7df27ee32573b2e6fc6cc8434
tree0d3ea1381b81700d17307fc6996a67bbabb7fac2
parent76dcee75c1aff61259f5ed55e2bcfab60cc4bd5f
hugetlb: add an inline helper for finding hstate index

Add an inline helper and use it in the code.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/hugetlb.h
mm/hugetlb.c