[PATCH] mm: mminit_validate_memmodel_limits - get rid of redundanttest

From: Cyrill Gorcunov
Date: Tue Jan 06 2009 - 07:12:30 EST


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 <gorcunov@xxxxxxxxxx>
---

I hope this time I don't miss anything.

mm/sparse.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6.git/mm/sparse.c
===================================================================
--- linux-2.6.git.orig/mm/sparse.c
+++ linux-2.6.git/mm/sparse.c
@@ -164,9 +164,7 @@ void __meminit mminit_validate_memmodel_
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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/