diff options
author | Ralph Campbell <[email protected]> | 2017-11-15 17:34:00 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-11-15 18:21:03 -0800 |
commit | 0bea803e9e6bf3836d5368a6426c30a8c0e5eab5 (patch) | |
tree | 6ea461225e701f2f8f5a9080f17f18a412121170 | |
parent | 007ab7b49acb93af650f3acec0e51d2c6b843934 (diff) |
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: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ralph Campbell <[email protected]>
Signed-off-by: Jérôme Glisse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | include/linux/hmm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/hmm.h b/include/linux/hmm.h index 96e69979f84d..325017ad9311 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -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]; } |