Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: remove nth_page()

Now that all users are gone, let's remove it.

Link: https://lkml.kernel.org/r/20250901150359.867252-38-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

David Hildenbrand and committed by
Andrew Morton
84efbefa d5170ce4

-3
-2
include/linux/mm.h
··· 210 210 211 211 #if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP) 212 212 bool page_range_contiguous(const struct page *page, unsigned long nr_pages); 213 - #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) 214 213 #else 215 - #define nth_page(page,n) ((page) + (n)) 216 214 static inline bool page_range_contiguous(const struct page *page, 217 215 unsigned long nr_pages) 218 216 {
-1
tools/testing/scatterlist/linux/mm.h
··· 51 51 52 52 #define page_to_pfn(page) ((unsigned long)(page) / PAGE_SIZE) 53 53 #define pfn_to_page(pfn) (void *)((pfn) * PAGE_SIZE) 54 - #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) 55 54 56 55 #define __min(t1, t2, min1, min2, x, y) ({ \ 57 56 t1 min1 = (x); \