summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-02-27 22:23:35 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-03-07 00:04:18 +0300
commit9164448d3100d5118bda5e9d38b69a9f32cea509 (patch)
treeb190042aa238dc9bf0ea4c493c610e93ebe30948
parent29cfe7556bfd6be043b6eb602a29c89d43565d71 (diff)
downloadlinux-9164448d3100d5118bda5e9d38b69a9f32cea509.tar.xz
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>
-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