public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] arm64: vdso: Add extern declarations for vDSO time-related functions
@ 2020-09-15 11:24 Tian Tao
  2020-09-15 11:48 ` Will Deacon
  0 siblings, 1 reply; 4+ messages in thread
From: Tian Tao @ 2020-09-15 11:24 UTC (permalink / raw)
  To: catalin.marinas, will, vincenzo.frascino, tglx, linux-arm-kernel; +Cc: linuxarm

Add extern declarations for vDSO time-related functions to notify the
compiler these functions will be used in somewhere to fix
"no previous prototype" compile warning.

arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning: no previous
prototype for ‘__kernel_clock_gettime’ [-Wmissing-prototypes]
int __kernel_clock_gettime(clockid_t clock,
     ^
arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning: no previous
prototype for ‘__kernel_gettimeofday’ [-Wmissing-prototypes]
int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
     ^
arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning: no previous
prototype for ‘__kernel_clock_getres’ [-Wmissing-prototypes]
int __kernel_clock_getres(clockid_t clock_id,

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 arch/arm64/kernel/vdso/vgettimeofday.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm64/kernel/vdso/vgettimeofday.c b/arch/arm64/kernel/vdso/vgettimeofday.c
index 4236cf3..e808481 100644
--- a/arch/arm64/kernel/vdso/vgettimeofday.c
+++ b/arch/arm64/kernel/vdso/vgettimeofday.c
@@ -6,18 +6,27 @@
  *
  */
 
+extern
+int __kernel_clock_gettime(clockid_t clock,
+			   struct __kernel_timespec *ts);
 int __kernel_clock_gettime(clockid_t clock,
 			   struct __kernel_timespec *ts)
 {
 	return __cvdso_clock_gettime(clock, ts);
 }
 
+extern
+int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
+			  struct timezone *tz);
 int __kernel_gettimeofday(struct __kernel_old_timeval *tv,
 			  struct timezone *tz)
 {
 	return __cvdso_gettimeofday(tv, tz);
 }
 
+extern
+int __kernel_clock_getres(clockid_t clock_id,
+			  struct __kernel_timespec *res);
 int __kernel_clock_getres(clockid_t clock_id,
 			  struct __kernel_timespec *res)
 {
-- 
2.7.4


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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-18 14:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-15 11:24 [PATCH] arm64: vdso: Add extern declarations for vDSO time-related functions Tian Tao
2020-09-15 11:48 ` Will Deacon
2020-09-15 12:06   ` tiantao (H)
2020-09-18 14:41   ` Jean-Philippe Brucker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox