}
#endif
-static int do_hres(const struct vdso_data *vd, clockid_t clk,
+static __always_inline int do_hres(const struct vdso_data *vd, clockid_t clk,
struct __kernel_timespec *ts)
{
const struct vdso_timestamp *vdso_ts = &vd->basetime[clk];
return 0;
}
-static int do_coarse(const struct vdso_data *vd, clockid_t clk,
- struct __kernel_timespec *ts)
+static __always_inline int do_coarse(const struct vdso_data *vd, clockid_t clk,
+ struct __kernel_timespec *ts)
{
const struct vdso_timestamp *vdso_ts = &vd->basetime[clk];
u32 seq;
*/
msk = 1U << clock;
if (likely(msk & VDSO_HRES))
- return do_hres(&vd[CS_HRES_COARSE], clock, ts);
+ vd = &vd[CS_HRES_COARSE];
else if (msk & VDSO_COARSE)
return do_coarse(&vd[CS_HRES_COARSE], clock, ts);
else if (msk & VDSO_RAW)
- return do_hres(&vd[CS_RAW], clock, ts);
+ vd = &vd[CS_RAW];
+ else
+ return -1;
- return -1;
+ return do_hres(vd, clock, ts);
}
static __maybe_unused int