]> git.itanic.dy.fi Git - linux-stable/commitdiff
perf intel-pt: Use existing definitions of le16_to_cpu() etc
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 5 Oct 2023 19:04:49 +0000 (22:04 +0300)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 17 Oct 2023 19:40:49 +0000 (12:40 -0700)
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>
tools/perf/util/intel-pt-decoder/intel-pt-pkt-decoder.c

index 249610cc928489d12bbabf58aafdc8eb28f6e690..ffd0d647473c185e9fc0f2c782c289143a956e52 100644 (file)
@@ -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"
 #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