From: Cyrill Gorcunov Date: Tue, 31 Mar 2009 22:19:25 +0000 (-0700) Subject: mm: mminit_validate_memmodel_limits(): remove redundant test X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ef161a9863b045909142daea9490b067997f3dc5;p=linux-2.6-omap-h63xx.git mm: mminit_validate_memmodel_limits(): remove redundant test In case if start_pfn overlap the upper bound no need to test end_pfn again since we have it already trimmed. Signed-off-by: Cyrill Gorcunov Reviewed-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/sparse.c b/mm/sparse.c index 083f5b63e7a..da432d9f0ae 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -164,9 +164,7 @@ void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn, WARN_ON_ONCE(1); *start_pfn = max_sparsemem_pfn; *end_pfn = max_sparsemem_pfn; - } - - if (*end_pfn > max_sparsemem_pfn) { + } else if (*end_pfn > max_sparsemem_pfn) { mminit_dprintk(MMINIT_WARNING, "pfnvalidation", "End of range %lu -> %lu exceeds SPARSEMEM max %lu\n", *start_pfn, *end_pfn, max_sparsemem_pfn);