Commit 0bea803e authored by Ralph Campbell's avatar Ralph Campbell Committed by Linus Torvalds

mm/hmm: constify hmm_devmem_page_get_drvdata() parameter

Constify pointer parameter to avoid issue when use from code that only
has const struct page pointer to use in the first place.

Link: default avatarRalph Campbell <>
Signed-off-by: default avatarJérôme Glisse <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 007ab7b4
......@@ -471,9 +471,9 @@ static inline void hmm_devmem_page_set_drvdata(struct page *page,
* @page: pointer to struct page
* Return: driver data value
static inline unsigned long hmm_devmem_page_get_drvdata(struct page *page)
static inline unsigned long hmm_devmem_page_get_drvdata(const struct page *page)
unsigned long *drvdata = (unsigned long *)&page->pgmap;
const unsigned long *drvdata = (const unsigned long *)&page->pgmap;
return drvdata[1];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment