diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2023-10-05 22:04:49 +0300 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2023-10-17 12:40:49 -0700 |
commit | f058fa5b07556abed26e5ae9d8e8ad13f79e1fa2 (patch) | |
tree | 156fcff099cdad689e7d0dc6ef880864e14d1eb7 | |
parent | 1d2dbce9bb9243ca18cacff5ada9dc00fc1e74b7 (diff) | |
download | lwn-f058fa5b07556abed26e5ae9d8e8ad13f79e1fa2.tar.gz lwn-f058fa5b07556abed26e5ae9d8e8ad13f79e1fa2.zip |
perf intel-pt: Use existing definitions of le16_to_cpu() etc
Use definitions from tools/include/linux/kernel.h
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20231005190451.175568-4-adrian.hunter@intel.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
-rw-r--r-- | tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c index 249610cc9284..ffd0d647473c 100644 --- a/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c @@ -8,6 +8,7 @@ #include <string.h> #include <endian.h> #include <byteswap.h> +#include <linux/kernel.h> #include <linux/compiler.h> #include "intel-pt-pkt-decoder.h" @@ -17,17 +18,11 @@ #define BIT63 ((uint64_t)1 << 63) #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -#define le16_to_cpu bswap_16 -#define le32_to_cpu bswap_32 -#define le64_to_cpu bswap_64 #define memcpy_le64(d, s, n) do { \ memcpy((d), (s), (n)); \ *(d) = le64_to_cpu(*(d)); \ } while (0) #else -#define le16_to_cpu -#define le32_to_cpu -#define le64_to_cpu #define memcpy_le64 memcpy #endif |