mm: check __highest_present_section_nr directly in memory_dev_init()
authorWei Yang <[email protected]>
Tue, 10 Apr 2018 23:29:23 +0000 (16:29 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Apr 2018 17:28:31 +0000 (10:28 -0700)
commitbc8755ba66325cb5874eef81d935e91c331d0b1d
tree6f7d4cdc25031e9db54d1bde4211cfa333ee7d7f
parent09a913a7a947fb6f624379e9da22670994942b85
mm: check __highest_present_section_nr directly in memory_dev_init()

__highest_present_section_nr is a more strict boundary than
NR_MEM_SECTIONS.  So checking __highest_present_section_nr directly is
enough.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Wei Yang <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/base/memory.c