summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>2024-05-24 13:06:39 +0300
committerLen Brown <len.brown@intel.com>2024-06-28 07:04:33 +0300
commitc81c8ee445e84703cd90171365ed596ef94399cc (patch)
treefeeed4f693480fc7d76d2bfee805ff3b688f5c98 /tools
parent1b3bf0747d4f1a963e59c26e602868bdce195318 (diff)
downloadlinux-c81c8ee445e84703cd90171365ed596ef94399cc.tar.xz
tools/power turbostat: Remove anonymous union from rapl_counter_info_t
fd_perf field used to be part of the union, but later moved out of it, because we test it with fd_perf != -1 to determine if any perf counter is opened, making the union unused. Signed-off-by: Patryk Wlazlyn <patryk.wlazlyn@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/power/x86/turbostat/turbostat.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 02312e62c857..1ac74cd49cc9 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -1085,15 +1085,9 @@ struct rapl_counter_info_t {
unsigned long long flags[NUM_RAPL_COUNTERS];
double scale[NUM_RAPL_COUNTERS];
enum rapl_unit unit[NUM_RAPL_COUNTERS];
-
- union {
- /* Active when source == RAPL_SOURCE_MSR */
- struct {
- unsigned long long msr[NUM_RAPL_COUNTERS];
- unsigned long long msr_mask[NUM_RAPL_COUNTERS];
- int msr_shift[NUM_RAPL_COUNTERS];
- };
- };
+ unsigned long long msr[NUM_RAPL_COUNTERS];
+ unsigned long long msr_mask[NUM_RAPL_COUNTERS];
+ int msr_shift[NUM_RAPL_COUNTERS];
int fd_perf;
};