diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2019-04-11 05:49:43 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-05-07 17:18:28 -0400 |
commit | ea70d791c1687529edf9bb9a69530a66e1ca4584 (patch) | |
tree | c7520cc8969852632589b7bb775dfb81ac216c9b /arch/um/include | |
parent | 0d4e5ac7e78035950d564e65c38ce148cb9af681 (diff) |
um: define set_pte_at() as a static inline function, not a macro
When defined as macro, the mm argument is unused and subsequently the
variable passed as mm is considered unused by the compiler. This fixes
a build warning.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Acked-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/asm/pgtable.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h index 9c04562310b3..b377df76cc28 100644 --- a/arch/um/include/asm/pgtable.h +++ b/arch/um/include/asm/pgtable.h | |||
@@ -263,7 +263,12 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval) | |||
263 | *pteptr = pte_mknewpage(*pteptr); | 263 | *pteptr = pte_mknewpage(*pteptr); |
264 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | 264 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); |
265 | } | 265 | } |
266 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | 266 | |
267 | static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | ||
268 | pte_t *pteptr, pte_t pteval) | ||
269 | { | ||
270 | set_pte(pteptr, pteval); | ||
271 | } | ||
267 | 272 | ||
268 | #define __HAVE_ARCH_PTE_SAME | 273 | #define __HAVE_ARCH_PTE_SAME |
269 | static inline int pte_same(pte_t pte_a, pte_t pte_b) | 274 | static inline int pte_same(pte_t pte_a, pte_t pte_b) |