Skip to content

Commit c81c8ee

Browse files
Patryk Wlazlynlenb
authored andcommitted
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 <[email protected]> Signed-off-by: Len Brown <[email protected]>
1 parent 1b3bf07 commit c81c8ee

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,15 +1085,9 @@ struct rapl_counter_info_t {
10851085
unsigned long long flags[NUM_RAPL_COUNTERS];
10861086
double scale[NUM_RAPL_COUNTERS];
10871087
enum rapl_unit unit[NUM_RAPL_COUNTERS];
1088-
1089-
union {
1090-
/* Active when source == RAPL_SOURCE_MSR */
1091-
struct {
1092-
unsigned long long msr[NUM_RAPL_COUNTERS];
1093-
unsigned long long msr_mask[NUM_RAPL_COUNTERS];
1094-
int msr_shift[NUM_RAPL_COUNTERS];
1095-
};
1096-
};
1088+
unsigned long long msr[NUM_RAPL_COUNTERS];
1089+
unsigned long long msr_mask[NUM_RAPL_COUNTERS];
1090+
int msr_shift[NUM_RAPL_COUNTERS];
10971091

10981092
int fd_perf;
10991093
};

0 commit comments

Comments
 (0)