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

From: David Hildenbrand (Arm)

Date: Mon Sep 21 2026 - 16:11:26 EST


Unused, let's remove it.

Acked-by: Oscar Salvador <osalvador@xxxxxxx>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
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 0c2fea48c261b..a3937577fbfb2 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -2326,13 +2326,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) {
@@ -2362,9 +2355,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