diff options
author | Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> | 2024-04-23 11:59:49 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2024-05-01 06:04:24 +0200 |
commit | d3e6f6253895f499b63bac261b81732f9efc4902 (patch) | |
tree | 20645c05a67d7e0e267e0a5c3ad47c3117ea887b /tools/power | |
parent | tools/power turbostat: Add ARL-H support (diff) | |
download | linux-d3e6f6253895f499b63bac261b81732f9efc4902.tar.xz linux-d3e6f6253895f499b63bac261b81732f9efc4902.zip |
tools/power turbostat: Replace _Static_assert with BUILD_BUG_ON
So it compiles on GCC older than 9.0.
Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index fadf96934f4e..bd6cb31b7099 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -38,6 +38,7 @@ #include <stdbool.h> #include <assert.h> #include <linux/kernel.h> +#include <linux/build_bug.h> #define UNUSED(x) (void)(x) @@ -3467,7 +3468,7 @@ int get_rapl_counters(int cpu, int domain, struct core_data *c, struct pkg_data } } - _Static_assert(NUM_RAPL_COUNTERS == 7); + BUILD_BUG_ON(NUM_RAPL_COUNTERS != 7); write_rapl_counter(&p->energy_pkg, rci, RAPL_RCI_INDEX_ENERGY_PKG); write_rapl_counter(&p->energy_cores, rci, RAPL_RCI_INDEX_ENERGY_CORES); write_rapl_counter(&p->energy_dram, rci, RAPL_RCI_INDEX_DRAM); |