mm: mminit_validate_memmodel_limits - get rid of redundant test
Subsystems (2)
PATCH 1/1 mm: mminit_validate_memmodel_limits - get rid of 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 <[email protected]>
---
I hope this time I don't miss anything.
mm/sparse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
mm/sparse.c +1 -3
@@ -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);
Reviewed-by Christoph Lameter <[email protected]>