projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29cfe75
)
mm: remove cast from page_to_nid()
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Tue, 27 Feb 2024 19:23:35 +0000
(19:23 +0000)
committer
Andrew Morton
<akpm@linux-foundation.org>
Wed, 6 Mar 2024 21:04:18 +0000
(13:04 -0800)
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>
include/linux/mm.h
patch
|
blob
|
history
diff --git
a/include/linux/mm.h
b/include/linux/mm.h
index 02547c8adda0c4300d810dcf89ef2f536e8b4bed..699e850d143cfe6eacf2c9416e207b7eaa751fcf 100644
(file)
--- 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