On Mon, Apr 22, 2019 at 8:04 PM Ingo Molnar <mi...@kernel.org> wrote: > Minor style nit: the parentheses are unnecessary, integer expressions > like this are evaluated left to right and multiplication and division has > the same precedence.
Fair point, although the same could be said for cpu_khz_from_msr(). > But it might also make sense to actually store crystal_mhz instead of > crystal_khz, because both CPUID 15H and 16H provides MHz values. > > That way the above expression would simplify to: > > lapic_timer_frequency = crystal_mhz / HZ; Wouldn't it be lapic_timer_frequency = crystal_mhz * 1000000 / HZ; ? Thanks Daniel