]> git.baikalelectronics.ru Git - kernel.git/commit
mm/sparse.c: check __highest_present_section_nr only for a present section
authorWei Yang <richard.weiyang@gmail.com>
Fri, 8 Jun 2018 00:06:39 +0000 (17:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 8 Jun 2018 00:34:35 +0000 (17:34 -0700)
commit84803b6bc661691b71dbabb92898c5bbe9d33d22
tree229420d94dcf7f7c0950d8b92cf621501167525c
parent4549d2c67c7a6f2f60989dae3456b1a3acae1222
mm/sparse.c: check __highest_present_section_nr only for a present section

When searching a present section, there are two boundaries:

    * __highest_present_section_nr
    * NR_MEM_SECTIONS

And it is known, __highest_present_section_nr is a more strict boundary
than NR_MEM_SECTIONS.  This means it would be necessary to check
__highest_present_section_nr only.

Link: http://lkml.kernel.org/r/20180326081956.75275-2-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/sparse.c