mm: mminit_validate_memmodel_limits(): remove redundant test
authorCyrill Gorcunov <[email protected]>
Tue, 31 Mar 2009 22:19:25 +0000 (15:19 -0700)
committerLinus Torvalds <[email protected]>
Wed, 1 Apr 2009 15:59:11 +0000 (08:59 -0700)
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 <[email protected]>
Reviewed-by: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/sparse.c

index 083f5b63e7a8bdb8ab5196e11970691c2bd351d4..da432d9f0ae825eb4e050ed8168c1600c6a793da 100644 (file)
@@ -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);