[PATCH -next] riscv/mm/fault: Fix old style declaration warning

2020-09-09 Thread YueHaibing
Fix gcc build warning:

arch/riscv/mm/fault.c:81:1: warning: ‘inline’ is not at beginning of 
declaration [-Wold-style-declaration]
 static void inline vmalloc_fault(struct pt_regs *regs, int code, unsigned long 
addr)
 ^~

Reported-by: Hulk Robot 
Signed-off-by: YueHaibing 
---
 arch/riscv/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c
index a23eaf5ce95c..a173432ccf82 100644
--- a/arch/riscv/mm/fault.c
+++ b/arch/riscv/mm/fault.c
@@ -78,7 +78,7 @@ static inline void bad_area(struct pt_regs *regs, struct 
mm_struct *mm, int code
no_context(regs, addr);
 }
 
-static void inline vmalloc_fault(struct pt_regs *regs, int code, unsigned long 
addr)
+static inline void vmalloc_fault(struct pt_regs *regs, int code, unsigned long 
addr)
 {
pgd_t *pgd, *pgd_k;
pud_t *pud, *pud_k;
-- 
2.17.1




Re: [PATCH -next] riscv/mm/fault: fix old-style-declaration warning

2020-09-09 Thread Pekka Enberg
Hi,

On Wed, Sep 9, 2020 at 2:20 PM Wei Yongjun  wrote:
>
> gcc report build warning as follows:
>
> arch/riscv/mm/fault.c:81:1: warning:
>  'inline' is not at beginning of declaration [-Wold-style-declaration]
>81 | static void inline vmalloc_fault(struct pt_regs *regs, int code, 
> unsigned long addr)
>   | ^~
>
> This commit fix it by moving 'inline' after 'static'.
>
> Signed-off-by: Wei Yongjun 

Thanks for the fix, but Palmer committed similar fix from me to for-next:

https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git/commit/?h=for-next=6f36a9635082e1d6910bc7853d0c9fd12d7890b5

- Pekka


[PATCH -next] riscv/mm/fault: fix old-style-declaration warning

2020-09-09 Thread Wei Yongjun
gcc report build warning as follows:

arch/riscv/mm/fault.c:81:1: warning:
 'inline' is not at beginning of declaration [-Wold-style-declaration]
   81 | static void inline vmalloc_fault(struct pt_regs *regs, int code, 
unsigned long addr)
  | ^~

This commit fix it by moving 'inline' after 'static'.

Signed-off-by: Wei Yongjun 
---
 arch/riscv/mm/fault.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c
index a23eaf5ce95c..a173432ccf82 100644
--- a/arch/riscv/mm/fault.c
+++ b/arch/riscv/mm/fault.c
@@ -78,7 +78,7 @@ static inline void bad_area(struct pt_regs *regs, struct 
mm_struct *mm, int code
no_context(regs, addr);
 }
 
-static void inline vmalloc_fault(struct pt_regs *regs, int code, unsigned long 
addr)
+static inline void vmalloc_fault(struct pt_regs *regs, int code, unsigned long 
addr)
 {
pgd_t *pgd, *pgd_k;
pud_t *pud, *pud_k;