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 5/9] riscv: time: Fix no prototype for time_init
Date: Fri, 5 Mar 2021 19:33:28 +0800	[thread overview]
Message-ID: <20210305113332.428048-6-sunnanyong@huawei.com> (raw)
In-Reply-To: <20210305113332.428048-1-sunnanyong@huawei.com>

Fix the following W=1 compilation warning:
arch/riscv/kernel/time.c:16:13: warning: no previous prototype for ‘time_init’ [-Wmissing-prototypes]
   16 | void __init time_init(void)
      |             ^~~~~~~~~

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

diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
index 81de51e6aa32..507cae273bc6 100644
--- a/arch/riscv/include/asm/timex.h
+++ b/arch/riscv/include/asm/timex.h
@@ -88,4 +88,6 @@ static inline int read_current_timer(unsigned long *timer_val)
 	return 0;
 }
 
+extern void time_init(void);
+
 #endif /* _ASM_RISCV_TIMEX_H */
diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c
index 8a5cf99c0776..1b432264f7ef 100644
--- a/arch/riscv/kernel/time.c
+++ b/arch/riscv/kernel/time.c
@@ -9,6 +9,7 @@
 #include <linux/delay.h>
 #include <asm/sbi.h>
 #include <asm/processor.h>
+#include <asm/timex.h>
 
 unsigned long riscv_timebase;
 EXPORT_SYMBOL_GPL(riscv_timebase);
-- 
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 5/9] riscv: time: Fix no prototype for time_init
Date: Fri, 5 Mar 2021 19:33:28 +0800	[thread overview]
Message-ID: <20210305113332.428048-6-sunnanyong@huawei.com> (raw)
In-Reply-To: <20210305113332.428048-1-sunnanyong@huawei.com>

Fix the following W=1 compilation warning:
arch/riscv/kernel/time.c:16:13: warning: no previous prototype for ‘time_init’ [-Wmissing-prototypes]
   16 | void __init time_init(void)
      |             ^~~~~~~~~

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

diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
index 81de51e6aa32..507cae273bc6 100644
--- a/arch/riscv/include/asm/timex.h
+++ b/arch/riscv/include/asm/timex.h
@@ -88,4 +88,6 @@ static inline int read_current_timer(unsigned long *timer_val)
 	return 0;
 }
 
+extern void time_init(void);
+
 #endif /* _ASM_RISCV_TIMEX_H */
diff --git a/arch/riscv/kernel/time.c b/arch/riscv/kernel/time.c
index 8a5cf99c0776..1b432264f7ef 100644
--- a/arch/riscv/kernel/time.c
+++ b/arch/riscv/kernel/time.c
@@ -9,6 +9,7 @@
 #include <linux/delay.h>
 #include <asm/sbi.h>
 #include <asm/processor.h>
+#include <asm/timex.h>
 
 unsigned long riscv_timebase;
 EXPORT_SYMBOL_GPL(riscv_timebase);
-- 
2.25.1


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

  parent 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 ` [PATCH 1/9] riscv: traps: Fix no prototype warnings Nanyong Sun
2021-03-05 11:33   ` 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 ` Nanyong Sun [this message]
2021-03-05 11:33   ` [PATCH 5/9] riscv: time: Fix no prototype for time_init 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-6-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.