tools/power turbostat: Cleanup: bool force_load

It is confusing to increment what is effectively a bool value.
Define force_load as bool, and access it accordingly.

Assisted-by: Claude:claude-sonnet-4.6
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Len Brown 2026-05-04 15:32:12 -04:00
parent 501c340739
commit e1708e514a

View File

@ -523,7 +523,7 @@ unsigned int valid_rapl_msrs;
unsigned int summary_only;
unsigned int list_header_only;
unsigned int dump_only;
unsigned int force_load;
bool force_load;
unsigned int cpuid_has_aperf_mperf;
unsigned int cpuid_has_hv;
unsigned int has_aperf_access;
@ -1360,7 +1360,7 @@ void probe_platform_features(unsigned int family, unsigned int model)
if (authentic_amd || hygon_genuine) {
/* fallback to default features on unsupported models */
force_load++;
force_load = true;
if (max_extended_level >= 0x80000007) {
unsigned int eax, ebx, ecx, edx;
@ -1383,7 +1383,7 @@ void probe_platform_features(unsigned int family, unsigned int model)
}
end:
if (force_load && !platform) {
if ((force_load == true) && !platform) {
fprintf(outf, "Forced to run on unsupported platform!\n");
platform = &default_features;
}
@ -11555,7 +11555,7 @@ void cmdline(int argc, char **argv)
bic_lookup(&bic_enabled, optarg, SHOW_LIST);
break;
case 'f':
force_load++;
force_load = true;
break;
case 'd':
debug++;