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>
This commit is contained in:
committed by
Andrew Morton
parent
29cfe7556b
commit
9164448d31
+2
-4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user