]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/power turbostat: Fix delimiter bug in print functions
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 11 Mar 2026 09:00:34 +0000 (11:00 +0200)
committerLen Brown <len.brown@intel.com>
Wed, 18 Mar 2026 19:57:58 +0000 (15:57 -0400)
commitcdbefe9d4029d4834d404f7ba13a960b38a69e88
tree3d396b349cfa4585078d22d5896fa6b9a2155399
parentb6398bc2ef3a78f1be37ba01ae0a5eedaee47803
tools/power turbostat: Fix delimiter bug in print functions

Commands that add counters, such as 'turbostat --show C1,C1+'
display merged columns without a delimiter.

This is caused by the bad syntax: '(*printed++ ? delim : "")', shared by
print_name()/print_hex_value()/print_decimal_value()/print_float_value()

Use '((*printed)++ ? delim : "")' to correctly increment the value at *printed.

[lenb: fix code and commit message typo, re-word]
Fixes: 56dbb878507b ("tools/power turbostat: Refactor added column header printing")
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c