Message ID | 20210121013435.450471-1-siyanteng@loongson.cn (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] MIPS: mm: Add prototype for function __update_cache | expand |
On Thu, Jan 21, 2021 at 09:34:34AM +0800, Yanteng Si wrote: > This commit adds a prototype to fix error at W=1: > > arch/mips/mm/cache.c:129:6: error: no previous prototype > for '__update_cache' [-Werror=missing-prototypes] > > Signed-off-by: Yanteng Si <siyanteng@loongson.cn> > --- > arch/mips/include/asm/pgtable.h | 2 +- > arch/mips/mm/cache.c | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) applied to mips-next. Thomas.
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index 4d3ab682d093..804889b70965 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h @@ -64,6 +64,7 @@ struct vm_area_struct; #define __S111 __pgprot(0) extern unsigned long _page_cachable_default; +extern void __update_cache(unsigned long address, pte_t pte); /* * ZERO_PAGE is a global shared page that is always zero; used @@ -224,7 +225,6 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) { - extern void __update_cache(unsigned long address, pte_t pte); if (!pte_present(pteval)) goto cache_sync_done; diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 23b16bfd97b2..27f4228dd24e 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c @@ -21,6 +21,7 @@ #include <asm/cpu.h> #include <asm/cpu-features.h> #include <asm/setup.h> +#include <asm/pgtable.h> /* Cache operations. */ void (*flush_cache_all)(void);
This commit adds a prototype to fix error at W=1: arch/mips/mm/cache.c:129:6: error: no previous prototype for '__update_cache' [-Werror=missing-prototypes] Signed-off-by: Yanteng Si <siyanteng@loongson.cn> --- arch/mips/include/asm/pgtable.h | 2 +- arch/mips/mm/cache.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)