[PATCH 6/7] clocksource/drivers/timer-riscv: Replace CONFIG_GENERIC_GETTIMEOFDAY ifdeffery with IS_ENABLED()
Thomas Weißschuh <[email protected]> Thu, 09 Jul 2026 13:32:42 +0200
| Newsgroups | gmane.linux.ports.riscv,gmane.linux.kernel.cross-arch,gmane.linux.kernel,gmane.linux.kbuild.devel,gmane.linux.ports.mips,gmane.linux.ports.arm.kernel |
|---|---|
| Message-ID | <[email protected]> |
Now that there is a dummy declaration of VDSO_CLOCKMODE_ARCHTIMER, even if no vDSO is built, the ugly ifdeffery can be replaced with a cleaner IS_ENABLED() check. Signed-off-by: Thomas Weißschuh <[email protected]> --- drivers/clocksource/timer-riscv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c index cfc4d83c42c0..82bd380b3dda 100644 --- a/drivers/clocksource/timer-riscv.c +++ b/drivers/clocksource/timer-riscv.c @@ -98,11 +98,8 @@ static struct clocksource riscv_clocksource = { .mask = CLOCKSOURCE_MASK(64), .flags = CLOCK_SOURCE_IS_CONTINUOUS, .read = riscv_clocksource_rdtime, -#if IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) - .vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER, -#else - .vdso_clock_mode = VDSO_CLOCKMODE_NONE, -#endif + .vdso_clock_mode = IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) ? + VDSO_CLOCKMODE_ARCHTIMER : VDSO_CLOCKMODE_NONE, }; static int riscv_timer_starting_cpu(unsigned int cpu) -- 2.55.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv