riscv: fix build warning of mm/pageattr
authorZong Li <zong.li@sifive.com>
Thu, 16 Jul 2020 06:15:27 +0000 (14:15 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Thu, 30 Jul 2020 18:37:50 +0000 (11:37 -0700)
Add hearder for missing prototype. Also, static keyword should be at
beginning of declaration.

Signed-off-by: Zong Li <zong.li@sifive.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/mm/pageattr.c

index 289a9a5ea5b51e61608fd984a2fb871ffc8013a6..19fecb362d81588170a56c2cd97d95075b7f85e1 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/bitops.h>
+#include <asm/set_memory.h>
 
 struct pageattr_masks {
        pgprot_t set_mask;
@@ -94,7 +95,7 @@ static int pageattr_pte_hole(unsigned long addr, unsigned long next,
        return 0;
 }
 
-const static struct mm_walk_ops pageattr_ops = {
+static const struct mm_walk_ops pageattr_ops = {
        .pgd_entry = pageattr_pgd_entry,
        .p4d_entry = pageattr_p4d_entry,
        .pud_entry = pageattr_pud_entry,