mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-16 08:47:09 +07:00
arm: mm: use __pfn_to_section() to get mem_section
Replace the open-coded '__nr_to_section(pfn_to_section_nr(pfn))' in pfn_valid() with a more concise call to '__pfn_to_section(pfn)'. No functional change. Signed-off-by: Guixiong Wei <guixiongwei@gmail.com> Link: https://lore.kernel.org/r/20200430161858.11379-1-guixiongwei@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
ada66f1837
commit
037d9303a7
@ -272,7 +272,7 @@ int pfn_valid(unsigned long pfn)
|
||||
if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
|
||||
return 0;
|
||||
|
||||
if (!valid_section(__nr_to_section(pfn_to_section_nr(pfn))))
|
||||
if (!valid_section(__pfn_to_section(pfn)))
|
||||
return 0;
|
||||
#endif
|
||||
return memblock_is_map_memory(addr);
|
||||
|
Loading…
Reference in New Issue
Block a user