init: check printed flag to skip printing message
authorDiwakar Tundlam <dtundlam@nvidia.com>
Fri, 23 Mar 2012 22:02:28 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 23:58:38 +0000 (16:58 -0700)
Otherwise the 'Calibration skipped' message gets printed everytime a CPU
is hotplugged in, cluttering console for systems that frequently hotplug
CPUs.

Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: Sameer Nanda <snanda@chromium.org>
Cc: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
init/calibrate.c

index 5f117ca9e0694488765ed0d4c0ea70baae7e6a04..fda0a7b0f06c006467c43d04f658744b146a6266 100644 (file)
@@ -267,7 +267,8 @@ void __cpuinit calibrate_delay(void)
 
        if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
                lpj = per_cpu(cpu_loops_per_jiffy, this_cpu);
-               pr_info("Calibrating delay loop (skipped) "
+               if (!printed)
+                       pr_info("Calibrating delay loop (skipped) "
                                "already calibrated this CPU");
        } else if (preset_lpj) {
                lpj = preset_lpj;