]> www.infradead.org Git - linux-platform-drivers-x86.git/commitdiff
riscv: time: Fix no prototype for time_init
authorNanyong Sun <sunnanyong@huawei.com>
Fri, 5 Mar 2021 11:33:28 +0000 (19:33 +0800)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 10 Mar 2021 04:46:03 +0000 (20:46 -0800)
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>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/include/asm/timex.h
arch/riscv/kernel/time.c

index 81de51e6aa32b3e6690bad5bb7ed6ebe206029cd..507cae273bc62cec5ff052cc78a7b67e4854aa87 100644 (file)
@@ -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 */
index 8a5cf99c07762403ebd55ba6f54e03005e28b7e4..1b432264f7ef86be3dd201d2babe5d7fa9327fcf 100644 (file)
@@ -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);