[CPUFREQ] Clean up convoluted code in arch/x86/kernel/tsc.c:time_cpufreq_notifier()
commit931db6a32dbfaad627e89d0524979ce9cb894691
authorDave Jones <davej@redhat.com>
Mon, 1 Jun 2009 16:29:55 +0000 (1 12:29 -0400)
committerDave Jones <davej@redhat.com>
Mon, 15 Jun 2009 15:49:42 +0000 (15 11:49 -0400)
tree50fd6fd41f8aca40ce95314fb16d33602859137f
parent51555c0e91160f6d4c6c1cb7a44d20ea346aed08
[CPUFREQ] Clean up convoluted code in arch/x86/kernel/tsc.c:time_cpufreq_notifier()

Christoph Hellwig noticed the following potential uninitialised use:

 > arch/x86/kernel/tsc.c: In function 'time_cpufreq_notifier':
 > arch/x86/kernel/tsc.c:634: warning: 'dummy' may be used uninitialized in this function
 >
 > where we do have CONFIG_SMP set, freq->flags & CPUFREQ_CONST_LOOPS is
 > true and ref_freq is false.

It seems plausable, though the circumstances for hitting it are really low.
Nearly all SMP capable cpufreq drivers set CPUFREQ_CONST_LOOPS.
powernow-k8 is really the only exception. The older CPUs were typically
only ever UP. (powernow-k7 never supported SMP for eg)

It's worth fixing regardless, as it cleans up the code.

Fix possible uninitialized use of dummy, by just removing it,
and making the setting of lpj more obvious.

Signed-off-by: Dave Jones <davej@redhat.com>
arch/x86/kernel/tsc.c