public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: mminit_validate_memmodel_limits - get rid of redundant test
@ 2009-01-06 12:12 Cyrill Gorcunov
  2009-01-06 14:28 ` Christoph Lameter
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2009-01-06 12:12 UTC (permalink / raw)
  To: Christoph Lameter, Andrew Morton, Nick Piggin, Pekka Enberg; +Cc: LKML

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@openvz.org>
---

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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-06 14:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-06 12:12 [PATCH] mm: mminit_validate_memmodel_limits - get rid of redundant test Cyrill Gorcunov
2009-01-06 14:28 ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox