All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nanyong Sun <sunnanyong@huawei.com>
To: <paul.walmsley@sifive.com>, <palmer@dabbelt.com>,
	<aou@eecs.berkeley.edu>
Cc: <linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<palmerdabbelt@google.com>, <atish.patra@wdc.com>,
	<wangkefeng.wang@huawei.com>, <sunnanyong@huawei.com>
Subject: [PATCH 1/9] riscv: traps: Fix no prototype warnings
Date: Fri, 5 Mar 2021 19:33:24 +0800	[thread overview]
Message-ID: <20210305113332.428048-2-sunnanyong@huawei.com> (raw)
In-Reply-To: <20210305113332.428048-1-sunnanyong@huawei.com>

Fix all W=1 compilation warnings:'no previous prototype for' in arch/riscv/kernel/traps.c:
arch/riscv/kernel/traps.c:96:15: warning: no previous prototype for ‘do_trap_unknown’ [-Wmissing-prototypes]
   96 | DO_ERROR_INFO(do_trap_unknown,
      |               ^~~~~~~~~~~~~~~
arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’
   91 | asmlinkage __visible void name(struct pt_regs *regs)   \
      |                           ^~~~
arch/riscv/kernel/traps.c:98:15: warning: no previous prototype for ‘do_trap_insn_misaligned’ [-Wmissing-prototypes]
   98 | DO_ERROR_INFO(do_trap_insn_misaligned,
      |               ^~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’
   91 | asmlinkage __visible void name(struct pt_regs *regs)   \
      |                           ^~~~
arch/riscv/kernel/traps.c:100:15: warning: no previous prototype for ‘do_trap_insn_fault’ [-Wmissing-prototypes]
...

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
---
 arch/riscv/include/asm/asm-prototypes.h | 16 ++++++++++++++++
 arch/riscv/kernel/traps.c               |  1 +
 2 files changed, 17 insertions(+)

diff --git a/arch/riscv/include/asm/asm-prototypes.h b/arch/riscv/include/asm/asm-prototypes.h
index 27e005fca584..6d81abf5d9f8 100644
--- a/arch/riscv/include/asm/asm-prototypes.h
+++ b/arch/riscv/include/asm/asm-prototypes.h
@@ -9,4 +9,20 @@ long long __lshrti3(long long a, int b);
 long long __ashrti3(long long a, int b);
 long long __ashlti3(long long a, int b);
 
+
+#define DECLARE_DO_ERROR_INFO(name)	asmlinkage void name(struct pt_regs *regs);
+
+DECLARE_DO_ERROR_INFO(do_trap_unknown)
+DECLARE_DO_ERROR_INFO(do_trap_insn_misaligned)
+DECLARE_DO_ERROR_INFO(do_trap_insn_fault)
+DECLARE_DO_ERROR_INFO(do_trap_insn_illegal)
+DECLARE_DO_ERROR_INFO(do_trap_load_fault)
+DECLARE_DO_ERROR_INFO(do_trap_load_misaligned)
+DECLARE_DO_ERROR_INFO(do_trap_store_misaligned)
+DECLARE_DO_ERROR_INFO(do_trap_store_fault)
+DECLARE_DO_ERROR_INFO(do_trap_ecall_u)
+DECLARE_DO_ERROR_INFO(do_trap_ecall_s)
+DECLARE_DO_ERROR_INFO(do_trap_ecall_m)
+DECLARE_DO_ERROR_INFO(do_trap_break)
+
 #endif /* _ASM_RISCV_PROTOTYPES_H */
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c
index 3ed2c23601a0..0879b5df11b9 100644
--- a/arch/riscv/kernel/traps.c
+++ b/arch/riscv/kernel/traps.c
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 
+#include <asm/asm-prototypes.h>
 #include <asm/bug.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Nanyong Sun <sunnanyong@huawei.com>
To: <paul.walmsley@sifive.com>, <palmer@dabbelt.com>,
	<aou@eecs.berkeley.edu>
Cc: <linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<palmerdabbelt@google.com>, <atish.patra@wdc.com>,
	<wangkefeng.wang@huawei.com>, <sunnanyong@huawei.com>
Subject: [PATCH 1/9] riscv: traps: Fix no prototype warnings
Date: Fri, 5 Mar 2021 19:33:24 +0800	[thread overview]
Message-ID: <20210305113332.428048-2-sunnanyong@huawei.com> (raw)
In-Reply-To: <20210305113332.428048-1-sunnanyong@huawei.com>

Fix all W=1 compilation warnings:'no previous prototype for' in arch/riscv/kernel/traps.c:
arch/riscv/kernel/traps.c:96:15: warning: no previous prototype for ‘do_trap_unknown’ [-Wmissing-prototypes]
   96 | DO_ERROR_INFO(do_trap_unknown,
      |               ^~~~~~~~~~~~~~~
arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’
   91 | asmlinkage __visible void name(struct pt_regs *regs)   \
      |                           ^~~~
arch/riscv/kernel/traps.c:98:15: warning: no previous prototype for ‘do_trap_insn_misaligned’ [-Wmissing-prototypes]
   98 | DO_ERROR_INFO(do_trap_insn_misaligned,
      |               ^~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/traps.c:91:27: note: in definition of macro ‘DO_ERROR_INFO’
   91 | asmlinkage __visible void name(struct pt_regs *regs)   \
      |                           ^~~~
arch/riscv/kernel/traps.c:100:15: warning: no previous prototype for ‘do_trap_insn_fault’ [-Wmissing-prototypes]
...

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Nanyong Sun <sunnanyong@huawei.com>
---
 arch/riscv/include/asm/asm-prototypes.h | 16 ++++++++++++++++
 arch/riscv/kernel/traps.c               |  1 +
 2 files changed, 17 insertions(+)

diff --git a/arch/riscv/include/asm/asm-prototypes.h b/arch/riscv/include/asm/asm-prototypes.h
index 27e005fca584..6d81abf5d9f8 100644
--- a/arch/riscv/include/asm/asm-prototypes.h
+++ b/arch/riscv/include/asm/asm-prototypes.h
@@ -9,4 +9,20 @@ long long __lshrti3(long long a, int b);
 long long __ashrti3(long long a, int b);
 long long __ashlti3(long long a, int b);
 
+
+#define DECLARE_DO_ERROR_INFO(name)	asmlinkage void name(struct pt_regs *regs);
+
+DECLARE_DO_ERROR_INFO(do_trap_unknown)
+DECLARE_DO_ERROR_INFO(do_trap_insn_misaligned)
+DECLARE_DO_ERROR_INFO(do_trap_insn_fault)
+DECLARE_DO_ERROR_INFO(do_trap_insn_illegal)
+DECLARE_DO_ERROR_INFO(do_trap_load_fault)
+DECLARE_DO_ERROR_INFO(do_trap_load_misaligned)
+DECLARE_DO_ERROR_INFO(do_trap_store_misaligned)
+DECLARE_DO_ERROR_INFO(do_trap_store_fault)
+DECLARE_DO_ERROR_INFO(do_trap_ecall_u)
+DECLARE_DO_ERROR_INFO(do_trap_ecall_s)
+DECLARE_DO_ERROR_INFO(do_trap_ecall_m)
+DECLARE_DO_ERROR_INFO(do_trap_break)
+
 #endif /* _ASM_RISCV_PROTOTYPES_H */
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c
index 3ed2c23601a0..0879b5df11b9 100644
--- a/arch/riscv/kernel/traps.c
+++ b/arch/riscv/kernel/traps.c
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/irq.h>
 
+#include <asm/asm-prototypes.h>
 #include <asm/bug.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
-- 
2.25.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2021-03-05 11:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 11:33 [PATCH 0/9] riscv: misc cleanup Nanyong Sun
2021-03-05 11:33 ` Nanyong Sun
2021-03-05 11:33 ` Nanyong Sun [this message]
2021-03-05 11:33   ` [PATCH 1/9] riscv: traps: Fix no prototype warnings Nanyong Sun
2021-03-10  4:47   ` Palmer Dabbelt
2021-03-10  4:47     ` Palmer Dabbelt
2021-03-05 11:33 ` [PATCH 2/9] riscv: irq: Fix no prototype warning Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-05 11:33 ` [PATCH 3/9] riscv: sbi: Fix comment of __sbi_set_timer_v01 Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-05 11:33 ` [PATCH 4/9] riscv: ptrace: Fix no prototype warnings Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-05 11:33 ` [PATCH 5/9] riscv: time: Fix no prototype for time_init Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-05 11:33 ` [PATCH 6/9] riscv: syscall_table: Reduce W=1 compilation warnings noise Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-05 11:33 ` [PATCH 7/9] riscv: process: Fix no prototype for show_regs Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-05 11:33 ` [PATCH 8/9] riscv: ftrace: Use ftrace_get_regs helper Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-05 11:33 ` [PATCH 9/9] riscv: process: Fix no prototype for arch_dup_task_struct Nanyong Sun
2021-03-05 11:33   ` Nanyong Sun
2021-03-10  4:47 ` [PATCH 0/9] riscv: misc cleanup Palmer Dabbelt
2021-03-10  4:47   ` Palmer Dabbelt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210305113332.428048-2-sunnanyong@huawei.com \
    --to=sunnanyong@huawei.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=atish.patra@wdc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=palmerdabbelt@google.com \
    --cc=paul.walmsley@sifive.com \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.