Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Thomas Weißschuh and committed by
Thomas Gleixner
f145d6bf 7d298d25

-25
-25
lib/vdso/gettimeofday.c
··· 108 108 return true; 109 109 } 110 110 111 - #ifdef CONFIG_TIME_NS 112 - 113 111 #ifdef CONFIG_GENERIC_VDSO_DATA_STORE 114 112 static __always_inline 115 113 const struct vdso_time_data *__arch_get_vdso_u_timens_data(const struct vdso_time_data *vd) ··· 147 149 148 150 return true; 149 151 } 150 - #else 151 - static __always_inline 152 - const struct vdso_time_data *__arch_get_vdso_u_timens_data(const struct vdso_time_data *vd) 153 - { 154 - return NULL; 155 - } 156 - 157 - static __always_inline 158 - bool do_hres_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns, 159 - clockid_t clk, struct __kernel_timespec *ts) 160 - { 161 - return false; 162 - } 163 - #endif 164 152 165 153 static __always_inline 166 154 bool do_hres(const struct vdso_time_data *vd, const struct vdso_clock *vc, ··· 188 204 return true; 189 205 } 190 206 191 - #ifdef CONFIG_TIME_NS 192 207 static __always_inline 193 208 bool do_coarse_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns, 194 209 clockid_t clk, struct __kernel_timespec *ts) ··· 216 233 217 234 return true; 218 235 } 219 - #else 220 - static __always_inline 221 - bool do_coarse_timens(const struct vdso_time_data *vdns, const struct vdso_clock *vcns, 222 - clockid_t clk, struct __kernel_timespec *ts) 223 - { 224 - return false; 225 - } 226 - #endif 227 236 228 237 static __always_inline 229 238 bool do_coarse(const struct vdso_time_data *vd, const struct vdso_clock *vc,