[PATCH 1/4] vdso/gettimeofday: Drop a few usages of __maybe_unused

Thomas Weißschuh posted 4 patches 1 month, 1 week ago
[PATCH 1/4] vdso/gettimeofday: Drop a few usages of __maybe_unused
Posted by Thomas Weißschuh 1 month, 1 week ago
These functions are used from the very same file,
so this annotation is unnecessary.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 lib/vdso/gettimeofday.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 4399e143d43a..4939ee86af65 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -313,7 +313,7 @@ __cvdso_clock_gettime_common(const struct vdso_time_data *vd, clockid_t clock,
 	return do_hres(vd, vc, clock, ts);
 }
 
-static __maybe_unused int
+static int
 __cvdso_clock_gettime_data(const struct vdso_time_data *vd, clockid_t clock,
 			   struct __kernel_timespec *ts)
 {
@@ -333,7 +333,7 @@ __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 }
 
 #ifdef BUILD_VDSO32
-static __maybe_unused int
+static int
 __cvdso_clock_gettime32_data(const struct vdso_time_data *vd, clockid_t clock,
 			     struct old_timespec32 *res)
 {
@@ -359,7 +359,7 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 }
 #endif /* BUILD_VDSO32 */
 
-static __maybe_unused int
+static int
 __cvdso_gettimeofday_data(const struct vdso_time_data *vd,
 			  struct __kernel_old_timeval *tv, struct timezone *tz)
 {
@@ -394,7 +394,7 @@ __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
 }
 
 #ifdef VDSO_HAS_TIME
-static __maybe_unused __kernel_old_time_t
+static __kernel_old_time_t
 __cvdso_time_data(const struct vdso_time_data *vd, __kernel_old_time_t *time)
 {
 	const struct vdso_clock *vc = vd->clock_data;
@@ -464,7 +464,7 @@ bool __cvdso_clock_getres_common(const struct vdso_time_data *vd, clockid_t cloc
 	return true;
 }
 
-static __maybe_unused
+static
 int __cvdso_clock_getres_data(const struct vdso_time_data *vd, clockid_t clock,
 			      struct __kernel_timespec *res)
 {
@@ -484,7 +484,7 @@ int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res)
 }
 
 #ifdef BUILD_VDSO32
-static __maybe_unused int
+static int
 __cvdso_clock_getres_time32_data(const struct vdso_time_data *vd, clockid_t clock,
 				 struct old_timespec32 *res)
 {

-- 
2.53.0

[tip: timers/vdso] vdso/gettimeofday: Drop a few usages of __maybe_unused
Posted by tip-bot2 for Thomas Weißschuh 4 weeks, 1 day ago
The following commit has been merged into the timers/vdso branch of tip:

Commit-ID:     08cd5e1de815842089ca3938c3ad7ac511097d70
Gitweb:        https://git.kernel.org/tip/08cd5e1de815842089ca3938c3ad7ac511097d70
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Fri, 27 Feb 2026 07:43:20 +01:00
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Wed, 11 Mar 2026 10:27:35 +01:00

vdso/gettimeofday: Drop a few usages of __maybe_unused

These functions are used from the very same file,
so this annotation is unnecessary.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260227-vdso-cleanups-v1-1-c848b4bc4850@linutronix.de
---
 lib/vdso/gettimeofday.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lib/vdso/gettimeofday.c b/lib/vdso/gettimeofday.c
index 4399e14..4939ee8 100644
--- a/lib/vdso/gettimeofday.c
+++ b/lib/vdso/gettimeofday.c
@@ -313,7 +313,7 @@ __cvdso_clock_gettime_common(const struct vdso_time_data *vd, clockid_t clock,
 	return do_hres(vd, vc, clock, ts);
 }
 
-static __maybe_unused int
+static int
 __cvdso_clock_gettime_data(const struct vdso_time_data *vd, clockid_t clock,
 			   struct __kernel_timespec *ts)
 {
@@ -333,7 +333,7 @@ __cvdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts)
 }
 
 #ifdef BUILD_VDSO32
-static __maybe_unused int
+static int
 __cvdso_clock_gettime32_data(const struct vdso_time_data *vd, clockid_t clock,
 			     struct old_timespec32 *res)
 {
@@ -359,7 +359,7 @@ __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res)
 }
 #endif /* BUILD_VDSO32 */
 
-static __maybe_unused int
+static int
 __cvdso_gettimeofday_data(const struct vdso_time_data *vd,
 			  struct __kernel_old_timeval *tv, struct timezone *tz)
 {
@@ -394,7 +394,7 @@ __cvdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz)
 }
 
 #ifdef VDSO_HAS_TIME
-static __maybe_unused __kernel_old_time_t
+static __kernel_old_time_t
 __cvdso_time_data(const struct vdso_time_data *vd, __kernel_old_time_t *time)
 {
 	const struct vdso_clock *vc = vd->clock_data;
@@ -464,7 +464,7 @@ bool __cvdso_clock_getres_common(const struct vdso_time_data *vd, clockid_t cloc
 	return true;
 }
 
-static __maybe_unused
+static
 int __cvdso_clock_getres_data(const struct vdso_time_data *vd, clockid_t clock,
 			      struct __kernel_timespec *res)
 {
@@ -484,7 +484,7 @@ int __cvdso_clock_getres(clockid_t clock, struct __kernel_timespec *res)
 }
 
 #ifdef BUILD_VDSO32
-static __maybe_unused int
+static int
 __cvdso_clock_getres_time32_data(const struct vdso_time_data *vd, clockid_t clock,
 				 struct old_timespec32 *res)
 {