[PATCH 07/12] mm/sparse: remove pfn_in_present_section()

From: David Hildenbrand (Arm)

Date: Wed Sep 09 2026 - 09:53:26 EST


Unused, let's remove it.

Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
---
include/linux/mmzone.h | 10 ----------
1 file changed, 10 deletions(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 19296e8ef44f8..e0fac344f6ac2 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -2315,13 +2315,6 @@ static inline unsigned long next_valid_pfn(unsigned long pfn, unsigned long end_

#endif

-static inline int pfn_in_present_section(unsigned long pfn)
-{
- if (pfn_to_section_nr(pfn) >= NR_MEM_SECTIONS)
- return 0;
- return present_section(__pfn_to_section(pfn));
-}
-
static inline unsigned long next_present_section_nr(unsigned long section_nr)
{
while (++section_nr <= __highest_used_section_nr) {
@@ -2351,9 +2344,6 @@ static inline unsigned long next_present_section_nr(unsigned long section_nr)
#else
#define pfn_to_nid(pfn) (0)
#endif
-
-#else
-#define pfn_in_present_section pfn_valid
#endif /* CONFIG_SPARSEMEM */

/*

--
2.43.0