]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/power turbostat: Remove anonymous union from rapl_counter_info_t
authorPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Fri, 24 May 2024 10:06:39 +0000 (12:06 +0200)
committerLen Brown <len.brown@intel.com>
Fri, 28 Jun 2024 04:04:33 +0000 (00:04 -0400)
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>
tools/power/x86/turbostat/turbostat.c

index 02312e62c857515df394f5a7fecb43a42fff86c3..1ac74cd49cc9cb3a12674c4ec1781df15ae3ae36 100644 (file)
@@ -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;
 };