Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754670Ab2E1PV3 (ORCPT ); Mon, 28 May 2012 11:21:29 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:51780 "EHLO e28smtp07.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667Ab2E1PV2 (ORCPT ); Mon, 28 May 2012 11:21:28 -0400 From: "Aneesh Kumar K.V" To: linux-mm@kvack.org, kamezawa.hiroyu@jp.fujitsu.com, mhocko@suse.cz, akpm@linux-foundation.org, rientjes@google.com Cc: linux-kernel@vger.kernel.org, "Aneesh Kumar K.V" Subject: [PATCH] mm/hugetlb: Use hstate_index instead of open coding it Date: Mon, 28 May 2012 20:51:13 +0530 Message-Id: <1338218473-30933-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.10 x-cbid: 12052815-8878-0000-0000-000002B1D34F Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1003 Lines: 30 From: "Aneesh Kumar K.V" Use hstate_index in hugetlb_init Signed-off-by: Aneesh Kumar K.V --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 4b90dd5..58eead5 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1891,7 +1891,7 @@ static int __init hugetlb_init(void) if (!size_to_hstate(default_hstate_size)) hugetlb_add_hstate(HUGETLB_PAGE_ORDER); } - default_hstate_idx = size_to_hstate(default_hstate_size) - hstates; + default_hstate_idx = hstate_index(size_to_hstate(default_hstate_size)); if (default_hstate_max_huge_pages) default_hstate.max_huge_pages = default_hstate_max_huge_pages; -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/