Skip to contentSkip to conversation

init: Fix erroneous printed check in calibrate_delay

PATCH New Jouni Hogander 1 participant 1 message Jul 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 init: Fix erroneous printed check in calibrate_delay

Calibration is skipped only on first calibrate_delay when it's done using timer. This is causing unnecessary delay when CPU is hotplugged in.

---
 init/calibrate.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
init/calibrate.c +4 -3
index fda0a7b..b7dcaf9 100644
@@ -275,10 +275,11 @@ void __cpuinit calibrate_delay(void)
 		if (!printed)
 			pr_info("Calibrating delay loop (skipped) "
 				"preset value.. ");
-	} else if ((!printed) && lpj_fine) {
+	} else if (lpj_fine) {
 		lpj = lpj_fine;
-		pr_info("Calibrating delay loop (skipped), "
-			"value calculated using timer frequency.. ");
+		if (!printed)
+			pr_info("Calibrating delay loop (skipped), "
+				"value calculated using timer frequency.. ");
 	} else if ((lpj = calibrate_delay_is_known())) {
 		;
 	} else if ((lpj = calibrate_delay_direct()) != 0) {
Signature · 6 lines
1.7.4.1
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki