um: define set_pte_at() as a static inline function, not a macro
PATCH 1/1 um: define set_pte_at() as a static inline function, not a macro
From: Bartosz Golaszewski <[email protected]>
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.
--- arch/um/include/asm/pgtable.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/um/include/asm/pgtable.h +6 -1
@@ -263,7 +263,12 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval) *pteptr =pte_mknewpage (*pteptr);if (pte_present (*pteptr)) *pteptr =pte_mknewprot (*pteptr); } -#define set_pte_at (mm,addr,ptep,pteval) set_pte(ptep,pteval) + +static inline void set_pte_at (struct mm_struct *mm,unsigned long addr, +pte_t *pteptr,pte_t pteval) +{ +set_pte (pteptr, pteval); +}#define __HAVE_ARCH_PTE_SAMEstatic inline int pte_same (pte_t pte_a,pte_t pte_b)
Signature · 1 line
2.20.1
Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
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 <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 20 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
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 <[email protected]>--- arch/um/include/asm/pgtable.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)arch/um/include/asm/pgtable.h +0
-0@@ -263,7 +263,12 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval) *pteptr =pte_mknewpage (*pteptr);if (pte_present (*pteptr)) *pteptr =pte_mknewprot (*pteptr); }
arch/um/include/asm/pgtable.h static inline void set_pte(pte_t *pteptr, pte_t pteval) · line 274
Quoted 10 lines
arch/um/include/asm/pgtable.h +6
-1-#define set_pte_at (mm,addr,ptep,pteval) set_pte(ptep,pteval) + +static inline void set_pte_at (struct mm_struct *mm,unsigned long addr, +pte_t *pteptr,pte_t pteval) +{ +set_pte (pteptr, pteval); +}#define __HAVE_ARCH_PTE_SAMEstatic inline int pte_same (pte_t pte_a,pte_t pte_b)
Signature · 3 lines
Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/