From: "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> Now that dump_page can take a const struct page pointer, we can get rid of the cast in page_to_nid(). --- include/linux/mm.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 933450bdcfd4..047144b894bd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1246,9 +1246,7 @@ extern 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 (page_poison_check(p)->flags >> NODES_PGSHIFT) & NODES_MASK; + return (page_poison_check(page)->flags >> NODES_PGSHIFT) & NODES_MASK; } #endif -- 2.25.1