diff mbox series

arm64: vdso: Clear common make C=2 warnings

Message ID 20230713115831.777-1-thunder.leizhen@huawei.com (mailing list archive)
State New, archived
Headers show
Series arm64: vdso: Clear common make C=2 warnings | expand

Commit Message

Leizhen (ThunderTown) July 13, 2023, 11:58 a.m. UTC
make C=2 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- xxx.o

When I use the command above to do a 'make C=2' check on any object file,
the following warnings are always output:

  CHECK   arch/arm64/kernel/vdso/vgettimeofday.c
arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning:
 symbol '__kernel_clock_gettime' was not declared. Should it be static?
arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning:
 symbol '__kernel_gettimeofday' was not declared. Should it be static?
arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning:
 symbol '__kernel_clock_getres' was not declared. Should it be static?

Therefore, the declaration of the three functions is added to eliminate
these common warnings to provide a clean output.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 arch/arm64/kernel/vdso/vgettimeofday.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Will Deacon July 20, 2023, 12:13 p.m. UTC | #1
On Thu, 13 Jul 2023 19:58:31 +0800, Zhen Lei wrote:
> make C=2 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- xxx.o
> 
> When I use the command above to do a 'make C=2' check on any object file,
> the following warnings are always output:
> 
>   CHECK   arch/arm64/kernel/vdso/vgettimeofday.c
> arch/arm64/kernel/vdso/vgettimeofday.c:9:5: warning:
>  symbol '__kernel_clock_gettime' was not declared. Should it be static?
> arch/arm64/kernel/vdso/vgettimeofday.c:15:5: warning:
>  symbol '__kernel_gettimeofday' was not declared. Should it be static?
> arch/arm64/kernel/vdso/vgettimeofday.c:21:5: warning:
>  symbol '__kernel_clock_getres' was not declared. Should it be static?
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: vdso: Clear common make C=2 warnings
      https://git.kernel.org/arm64/c/71e06e1acecb

Cheers,
diff mbox series

Patch

diff --git a/arch/arm64/kernel/vdso/vgettimeofday.c b/arch/arm64/kernel/vdso/vgettimeofday.c
index 4236cf34d7d9c34..9941c5b04f15878 100644
--- a/arch/arm64/kernel/vdso/vgettimeofday.c
+++ b/arch/arm64/kernel/vdso/vgettimeofday.c
@@ -6,6 +6,10 @@ 
  *
  */
 
+int __kernel_clock_gettime(clockid_t clock, struct __kernel_timespec *ts);
+int __kernel_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
+int __kernel_clock_getres(clockid_t clock_id, struct __kernel_timespec *res);
+
 int __kernel_clock_gettime(clockid_t clock,
 			   struct __kernel_timespec *ts)
 {