[PATCH v1 08/13] perf arm-spe: Add missing linux/types.h include

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



u64 is used for various structs in arm-spe-decoder.h, while uint64_t
is used in arm-spe-pkt-decoder.h. Avoid transitive dependencies
bringing in linux/types.h and directly depend upon it in
arm-spe-decoder.h. Fix arm-spe-decoder.c to use uint64_t, as the
header file does.

Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
---
 tools/perf/util/arm-spe-decoder/arm-spe-decoder.h     | 1 +
 tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h
index 1443c28545a9..da5c5816c948 100644
--- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h
+++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.h
@@ -10,6 +10,7 @@
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
+#include <linux/types.h>
 
 #include "arm-spe-pkt-decoder.h"
 
diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
index a454c6737563..e035f49f28ad 100644
--- a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
+++ b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
@@ -292,7 +292,7 @@ static int arm_spe_pkt_out_string(int *err, char **buf_p, size_t *blen,
 static int arm_spe_pkt_desc_event(const struct arm_spe_pkt *packet,
 				  char *buf, size_t buf_len)
 {
-	u64 payload = packet->payload;
+	uint64_t payload = packet->payload;
 	int err = 0;
 
 	arm_spe_pkt_out_string(&err, &buf, &buf_len, "EV");
@@ -332,7 +332,7 @@ static int arm_spe_pkt_desc_event(const struct arm_spe_pkt *packet,
 static int arm_spe_pkt_desc_op_type(const struct arm_spe_pkt *packet,
 				    char *buf, size_t buf_len)
 {
-	u64 payload = packet->payload;
+	uint64_t payload = packet->payload;
 	int err = 0;
 
 	switch (packet->index) {
@@ -429,7 +429,7 @@ static int arm_spe_pkt_desc_addr(const struct arm_spe_pkt *packet,
 {
 	int ns, el, idx = packet->index;
 	int ch, pat;
-	u64 payload = packet->payload;
+	uint64_t payload = packet->payload;
 	int err = 0;
 	static const char *idx_name[] = {"PC", "TGT", "VA", "PA", "PBT"};
 
@@ -469,7 +469,7 @@ static int arm_spe_pkt_desc_addr(const struct arm_spe_pkt *packet,
 static int arm_spe_pkt_desc_counter(const struct arm_spe_pkt *packet,
 				    char *buf, size_t buf_len)
 {
-	u64 payload = packet->payload;
+	uint64_t payload = packet->payload;
 	const char *name = arm_spe_pkt_name(packet->type);
 	int err = 0;
 
-- 
2.44.0.278.ge034bb2e1d-goog





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux