diff options
author | 2021-11-05 13:38:15 -0700 | |
---|---|---|
committer | 2021-11-06 13:30:35 -0700 | |
commit | f1dc0db296bd25960273649fc6ef2ecbf5aaa0e0 (patch) | |
tree | cfca0ead331986321e4ffc9c6e2f377f2a36da1b /include/linux/mmzone.h | |
parent | mm/mmap.c: fix a data race of mm->total_vm (diff) | |
download | linux-f1dc0db296bd25960273649fc6ef2ecbf5aaa0e0.tar.gz linux-f1dc0db296bd25960273649fc6ef2ecbf5aaa0e0.tar.bz2 linux-f1dc0db296bd25960273649fc6ef2ecbf5aaa0e0.zip |
mm: use __pfn_to_section() instead of open coding it
It is defined in the same file just a few lines above.
Link: https://lkml.kernel.org/r/4598487.Rc0NezkW7i@mobilepool36.emlix.com
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r-- | include/linux/mmzone.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 6a1d79d84675..832aa49d0d8e 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1481,7 +1481,7 @@ static inline int pfn_valid(unsigned long pfn) if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS) return 0; - ms = __nr_to_section(pfn_to_section_nr(pfn)); + ms = __pfn_to_section(pfn); if (!valid_section(ms)) return 0; /* @@ -1496,7 +1496,7 @@ static inline int pfn_in_present_section(unsigned long pfn) { if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS) return 0; - return present_section(__nr_to_section(pfn_to_section_nr(pfn))); + return present_section(__pfn_to_section(pfn)); } static inline unsigned long next_present_section_nr(unsigned long section_nr) |