Skip to content

Commit 3843aca

Browse files
zongboxpalmer-dabbelt
authored andcommitted
riscv: fix build warning of mm/pageattr
Add hearder for missing prototype. Also, static keyword should be at beginning of declaration. Signed-off-by: Zong Li <[email protected]> Reviewed-by: Pekka Enberg <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent e3ef4d6 commit 3843aca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/riscv/mm/pageattr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/pgtable.h>
88
#include <asm/tlbflush.h>
99
#include <asm/bitops.h>
10+
#include <asm/set_memory.h>
1011

1112
struct pageattr_masks {
1213
pgprot_t set_mask;
@@ -94,7 +95,7 @@ static int pageattr_pte_hole(unsigned long addr, unsigned long next,
9495
return 0;
9596
}
9697

97-
const static struct mm_walk_ops pageattr_ops = {
98+
static const struct mm_walk_ops pageattr_ops = {
9899
.pgd_entry = pageattr_pgd_entry,
99100
.p4d_entry = pageattr_p4d_entry,
100101
.pud_entry = pageattr_pud_entry,

0 commit comments

Comments
 (0)