diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2018-09-16 16:05:53 +0100 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2019-08-31 14:48:24 -0400 |
commit | adb8049097a9ec4acd09fbd3aa8636199a78df8a (patch) | |
tree | 53f64a739d15e67245f156603a4a2fbe3be10e94 /scripts/bpf_helpers_doc.py | |
parent | a55aa89aab90fae7c815b0551b07be37db359d76 (diff) |
tools/power x86_energy_perf_policy: Fix "uninitialized variable" warnings at -O2
x86_energy_perf_policy first uses __get_cpuid() to check the maximum
CPUID level and exits if it is too low. It then assumes that later
calls will succeed (which I think is architecturally guaranteed). It
also assumes that CPUID works at all (which is not guaranteed on
x86_32).
If optimisations are enabled, gcc warns about potentially
uninitialized variables. Fix this by adding an exit-on-error after
every call to __get_cpuid() instead of just checking the maximum
level.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions