aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-02-27 19:23:35 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-03-06 13:04:18 -0800
commit9164448d3100d5118bda5e9d38b69a9f32cea509 (patch)
treeb190042aa238dc9bf0ea4c493c610e93ebe30948 /include/linux/mm.h
parentmm: constify more page/folio tests (diff)
downloadwireguard-linux-9164448d3100d5118bda5e9d38b69a9f32cea509.tar.xz
wireguard-linux-9164448d3100d5118bda5e9d38b69a9f32cea509.zip
mm: remove cast from page_to_nid()
Now that PF_POISONED_CHECK() can take a const argument, we can drop the cast. Link: https://lkml.kernel.org/r/20240227192337.757313-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 02547c8adda0..699e850d143c 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1641,13 +1641,11 @@ static inline int page_zone_id(struct page *page)
}
#ifdef NODE_NOT_IN_PAGE_FLAGS
-extern int page_to_nid(const struct page *page);
+int page_to_nid(const struct page *page);
#else
static inline int page_to_nid(const struct page *page)
{
- struct page *p = (struct page *)page;
-
- return (PF_POISONED_CHECK(p)->flags >> NODES_PGSHIFT) & NODES_MASK;
+ return (PF_POISONED_CHECK(page)->flags >> NODES_PGSHIFT) & NODES_MASK;
}
#endif