Skip to content

Commit ed532d7

Browse files
dedekindlenb
authored andcommitted
tools/power turbostat: Consistently use print_float_value()
Fix the PMT thread code to use print_float_value(), to be consistent with the PMT core and package code. [lenb: commit message] Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent a444083 commit ed532d7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/power/x86/turbostat/turbostat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3489,12 +3489,12 @@ int format_counters(PER_THREAD_PARAMS)
34893489

34903490
case PMT_TYPE_XTAL_TIME:
34913491
value_converted = pct(value_raw / crystal_hz, interval_float);
3492-
outp += sprintf(outp, "%s%.2f", (printed++ ? delim : ""), value_converted);
3492+
outp += print_float_value(&printed, delim, value_converted);
34933493
break;
34943494

34953495
case PMT_TYPE_TCORE_CLOCK:
34963496
value_converted = pct(value_raw / tcore_clock_freq_hz, interval_float);
3497-
outp += sprintf(outp, "%s%.2f", (printed++ ? delim : ""), value_converted);
3497+
outp += print_float_value(&printed, delim, value_converted);
34983498
}
34993499
}
35003500

0 commit comments

Comments
 (0)