Skip to content

Commit f145d6b

Browse files
t-8chKAGA-KOKO
authored andcommitted
vdso/gettimeofday: Remove !CONFIG_TIME_NS stubs
All calls of these functions are already gated behind CONFIG_TIME_NS. The compiler will already optimize them away if time namespaces are disabled. Drop the unnecessary stubs. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250826-vdso-cleanups-v1-4-d9b65750e49f@linutronix.de
1 parent 7d298d2 commit f145d6b

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

lib/vdso/gettimeofday.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ bool vdso_get_timestamp(const struct vdso_time_data *vd, const struct vdso_clock
108108
return true;
109109
}
110110

111-
#ifdef CONFIG_TIME_NS
112-
113111
#ifdef CONFIG_GENERIC_VDSO_DATA_STORE
114112
static __always_inline
115113
const struct vdso_time_data *__arch_get_vdso_u_timens_data(const struct vdso_time_data *vd)
@@ -149,20 +147,6 @@ bool do_hres_timens(const struct vdso_time_data *vdns, const struct vdso_clock *
149147

150148
return true;
151149
}
152-
#else
153-
static __always_inline
154-
const struct vdso_time_data *__arch_get_vdso_u_timens_data(const struct vdso_time_data *vd)
155-
{
156-
return NULL;
157-
}
158-
159-
static __always_inline
160-
bool do_hres_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns,
161-
clockid_t clk, struct __kernel_timespec *ts)
162-
{
163-
return false;
164-
}
165-
#endif
166150

167151
static __always_inline
168152
bool do_hres(const struct vdso_time_data *vd, const struct vdso_clock *vc,
@@ -204,7 +188,6 @@ bool do_hres(const struct vdso_time_data *vd, const struct vdso_clock *vc,
204188
return true;
205189
}
206190

207-
#ifdef CONFIG_TIME_NS
208191
static __always_inline
209192
bool do_coarse_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns,
210193
clockid_t clk, struct __kernel_timespec *ts)
@@ -233,14 +216,6 @@ bool do_coarse_timens(const struct vdso_time_data *vdns, const struct vdso_clock
233216

234217
return true;
235218
}
236-
#else
237-
static __always_inline
238-
bool do_coarse_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns,
239-
clockid_t clk, struct __kernel_timespec *ts)
240-
{
241-
return false;
242-
}
243-
#endif
244219

245220
static __always_inline
246221
bool do_coarse(const struct vdso_time_data *vd, const struct vdso_clock *vc,

0 commit comments

Comments
 (0)