[PATCH 2/2 v2] perf test: Hwmon align structure on boundary in union

Thomas Richter posted 2 patches 10 months, 1 week ago
[PATCH 2/2 v2] perf test: Hwmon align structure on boundary in union
Posted by Thomas Richter 10 months, 1 week ago
Align both members in union hwmon_pmu_event_key to the same
boundary. Add unused structure members as sugguested.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Suggested-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/hwmon_pmu.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/hwmon_pmu.h b/tools/perf/util/hwmon_pmu.h
index b3329774d2b2..748cf93a859c 100644
--- a/tools/perf/util/hwmon_pmu.h
+++ b/tools/perf/util/hwmon_pmu.h
@@ -104,6 +104,10 @@ union hwmon_pmu_event_key {
 	struct {
 		int num :16;
 		enum hwmon_type type :8;
+		int unused: 8;
+#if __SIZEOF_LONG__ == 8
+		int unused2;
+#endif
 	};
 };
 
-- 
2.48.1