From: Sam Ravnborg <sam@ravnborg.org>
To: Andreas Larsson <andreas@gaisler.com>,
"David S. Miller" <davem@davemloft.net>,
sparclinux@vger.kernel.org
Cc: Nick Bowler <nbowler@draconx.ca>,
linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 10/10] sparc64: Fix prototype warnings for vdso
Date: Sat, 30 Mar 2024 10:57:46 +0100 [thread overview]
Message-ID: <20240330-sparc64-warnings-v1-10-37201023ee2f@ravnborg.org> (raw)
In-Reply-To: <20240330-sparc64-warnings-v1-0-37201023ee2f@ravnborg.org>
Fix the following warnings:
arch/sparc/vdso/vclock_gettime.c:254:1: error: no previous prototype for ‘__vdso_clock_gettime’
arch/sparc/vdso/vclock_gettime.c:282:1: error: no previous prototype for ‘__vdso_clock_gettime_stick’
arch/sparc/vdso/vclock_gettime.c:307:1: error: no previous prototype for ‘__vdso_gettimeofday’
arch/sparc/vdso/vclock_gettime.c:343:1: error: no previous prototype for ‘__vdso_gettimeofday_stick’
arch/sparc/vdso/vdso32/../vclock_gettime.c:254:1: error: no previous prototype for ‘__vdso_clock_gettime’
arch/sparc/vdso/vdso32/../vclock_gettime.c:282:1: error: no previous prototype for ‘__vdso_clock_gettime_stick’
arch/sparc/vdso/vdso32/../vclock_gettime.c:307:1: error: no previous prototype for ‘__vdso_gettimeofday’
arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: error: no previous prototype for ‘__vdso_gettimeofday_stick’
The warnings were fixed by adding the proper prototypes to asm/vdso.h.
The better fix would be to convert sparc to be y2038 compliant so the
generic variant of vdso.h could be used.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>
---
arch/sparc/include/asm/vdso.h | 10 ++++++++++
arch/sparc/vdso/vclock_gettime.c | 1 +
2 files changed, 11 insertions(+)
diff --git a/arch/sparc/include/asm/vdso.h b/arch/sparc/include/asm/vdso.h
index 59e79d35cd73..af630cad185c 100644
--- a/arch/sparc/include/asm/vdso.h
+++ b/arch/sparc/include/asm/vdso.h
@@ -5,6 +5,16 @@
#ifndef _ASM_SPARC_VDSO_H
#define _ASM_SPARC_VDSO_H
+#include <linux/linkage.h>
+#include <linux/time.h>
+#include <linux/time_types.h>
+#include <linux/types.h>
+
+notrace int __vdso_clock_gettime(clockid_t clock, struct __kernel_old_timespec *ts);
+notrace int __vdso_clock_gettime_stick(clockid_t clock, struct __kernel_old_timespec *ts);
+notrace int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz);
+notrace int __vdso_gettimeofday_stick(struct __kernel_old_timeval *tv, struct timezone *tz);
+
struct vdso_image {
void *data;
unsigned long size; /* Always a multiple of PAGE_SIZE */
diff --git a/arch/sparc/vdso/vclock_gettime.c b/arch/sparc/vdso/vclock_gettime.c
index e794edde6755..a3f85d9cea52 100644
--- a/arch/sparc/vdso/vclock_gettime.c
+++ b/arch/sparc/vdso/vclock_gettime.c
@@ -19,6 +19,7 @@
#include <asm/unistd.h>
#include <asm/timex.h>
#include <asm/clocksource.h>
+#include <asm/vdso.h>
#include <asm/vvar.h>
#ifdef CONFIG_SPARC64
--
2.34.1
prev parent reply other threads:[~2024-03-30 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-30 9:57 [PATCH 00/10] sparc64: Fix CPU online bug and warning fixes Sam Ravnborg
2024-03-30 9:57 ` [PATCH 01/10] sparc64: Fix prototype warning for init_vdso_image Sam Ravnborg
2024-03-30 9:57 ` [PATCH 02/10] sparc64: Fix prototype warnings in traps_64.c Sam Ravnborg
2024-03-30 9:57 ` [PATCH 03/10] sparc64: Fix prototype warning for vmemmap_free Sam Ravnborg
2024-03-30 9:57 ` [PATCH 04/10] sparc64: Fix prototype warning for alloc_irqstack_bootmem Sam Ravnborg
2024-03-30 9:57 ` [PATCH 05/10] sparc64: Fix prototype warning for uprobe_trap Sam Ravnborg
2024-03-30 9:57 ` [PATCH 06/10] sparc64: Fix prototype warning for dma_4v_iotsb_bind Sam Ravnborg
2024-03-30 9:57 ` [PATCH 07/10] sparc64: Fix prototype warnings in adi_64.c Sam Ravnborg
2024-03-30 9:57 ` [PATCH 08/10] sparc64: Fix prototype warning for sched_clock Sam Ravnborg
2024-03-30 9:57 ` [PATCH 09/10] sparc64: Fix number of online CPUs Sam Ravnborg
2024-03-30 9:57 ` Sam Ravnborg [this message]
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=20240330-sparc64-warnings-v1-10-37201023ee2f@ravnborg.org \
--to=sam@ravnborg.org \
--cc=andreas@gaisler.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nbowler@draconx.ca \
--cc=sparclinux@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).