[PATCH 4/7] clocksource/drivers/mips-gic-timer: Replace CONFIG_GENERIC_GETTIMEOFDAY ifdeffery with IS_ENABLED()
Thomas Weißschuh <[email protected]> Thu, 09 Jul 2026 13:32:40 +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_GIC, 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/mips-gic-timer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c index a1669266c94d..0dd30ba3cce7 100644 --- a/drivers/clocksource/mips-gic-timer.c +++ b/drivers/clocksource/mips-gic-timer.c @@ -198,9 +198,8 @@ static struct clocksource gic_clocksource = { .name = "GIC", .read = gic_hpt_read, .flags = CLOCK_SOURCE_IS_CONTINUOUS, -#ifdef CONFIG_GENERIC_GETTIMEOFDAY - .vdso_clock_mode = VDSO_CLOCKMODE_GIC, -#endif + .vdso_clock_mode = IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) ? + VDSO_CLOCKMODE_GIC : VDSO_CLOCKMODE_NONE, }; static void gic_clocksource_unstable(char *reason) -- 2.55.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv