[PATCH 3/7] MIPS: csrc-r4k: Replace CONFIG_GENERIC_GETTIMEOFDAY ifdeffery with IS_ENABLED()
Thomas Weißschuh <[email protected]> Thu, 09 Jul 2026 13:32:39 +0200
| Newsgroups | org.kernel.vger.linux-kbuild,dev.linux.lists.loongarch,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-arch,org.kernel.vger.linux-kernel,org.kernel.vger.linux-mips |
|---|---|
| Message-ID | <[email protected]> |
Now that there is a dummy declaration of VDSO_CLOCKMODE_R4K, 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]> --- arch/mips/kernel/csrc-r4k.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c index 241a934543a8..63aca74ab299 100644 --- a/arch/mips/kernel/csrc-r4k.c +++ b/arch/mips/kernel/csrc-r4k.c @@ -126,14 +126,12 @@ int __init init_r4k_clocksource(void) clocksource_mips.rating = 200; clocksource_mips.rating += clamp(mips_hpt_frequency / 10000000, 0, 99); -#ifdef CONFIG_GENERIC_GETTIMEOFDAY /* * R2 onwards makes the count accessible to user mode so it can be used * by the VDSO (HWREna is configured by configure_hwrena()). */ - if (cpu_has_mips_r2_r6 && rdhwr_count_usable()) + if (IS_ENABLED(CONFIG_GENERIC_GETTIMEOFDAY) && cpu_has_mips_r2_r6 && rdhwr_count_usable()) clocksource_mips.vdso_clock_mode = VDSO_CLOCKMODE_R4K; -#endif clocksource_register_hz(&clocksource_mips, mips_hpt_frequency); -- 2.55.0