Skip to content

Commit ef161a9

Browse files
cyrillostorvalds
authored andcommitted
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 <gorcunov@openvz.org> Reviewed-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0f043a8 commit ef161a9

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎mm/sparse.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,7 @@ void __meminit mminit_validate_memmodel_limits(unsigned long *start_pfn,
164164
WARN_ON_ONCE(1);
165165
*start_pfn = max_sparsemem_pfn;
166166
*end_pfn = max_sparsemem_pfn;
167-
}
168-
169-
if (*end_pfn > max_sparsemem_pfn) {
167+
} else if (*end_pfn > max_sparsemem_pfn) {
170168
mminit_dprintk(MMINIT_WARNING, "pfnvalidation",
171169
"End of range %lu -> %lu exceeds SPARSEMEM max %lu\n",
172170
*start_pfn, *end_pfn, max_sparsemem_pfn);

0 commit comments

Comments
 (0)