lkml.org 
[lkml]   [2018]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 7/7] x86/tsc: use tsc early
On Fri, 15 Jun 2018, Pavel Tatashin wrote:
> cpu_khz = x86_platform.calibrate_cpu();
> @@ -1380,7 +1466,7 @@ void __init tsc_init(void)
> if (!tsc_khz) {
> mark_tsc_unstable("could not calculate TSC khz");
> setup_clear_cpu_cap(X86_FEATURE_TSC_DEADLINE_TIMER);
> - return;
> + goto final_sched_clock;
> }
>
> pr_info("Detected %lu.%03lu MHz processor\n",
> @@ -1428,6 +1514,14 @@ void __init tsc_init(void)
>
> clocksource_register_khz(&clocksource_tsc_early, tsc_khz);
> detect_art();

I'm pretty sure you missed at least one instance of 'return'. That's just
error prone and any new exit path of tsc_init() adds another chance to miss
it.

Thanks,

tglx

\
 
 \ /
  Last update: 2018-06-20 01:21    [W:0.337 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site