Commit c81c8ee4 authored by Patryk Wlazlyn's avatar Patryk Wlazlyn Committed by Len Brown
Browse files

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: default avatarPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 1b3bf074
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -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];
		};
	};

	int fd_perf;
};