1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
From c660a5ee919f01e7c3269ea92baf13741c8aee17 Mon Sep 17 00:00:00 2001
From: Christian Breunig <christian@breunig.cc>
Date: Sat, 24 Jan 2026 07:06:05 +0100
Subject: [PATCH] tools: fix implicit declaration of function cpu_to_le16
After commit 64d86c03e1441742216b6332bdfabfb6ede31662 ("perf arm-spe: Extend
branch operations") which was also backported to the stable branches, the
restructuring caused a missing definition.
tools/include/linux/bitops.h implement
define __MAKE_OP(size) \
____MAKE_OP(le##size,u##size,cpu_to_le##size,le##size##_to_cpu) \
____MAKE_OP(be##size,u##size,cpu_to_be##size,be##size##_to_cpu) \
____MAKE_OP(u##size,u##size,,)
____MAKE_OP(u8,u8,,)
but cpu_to_le## or cpu_to_be## are not defined.
Fix by including linux/kernel.h.
---
tools/include/linux/bitfield.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/include/linux/bitfield.h b/tools/include/linux/bitfield.h
index 6093fa6db260..ddf81f24956b 100644
--- a/tools/include/linux/bitfield.h
+++ b/tools/include/linux/bitfield.h
@@ -8,6 +8,7 @@
#define _LINUX_BITFIELD_H
#include <linux/build_bug.h>
+#include <linux/kernel.h>
#include <asm/byteorder.h>
/*
--
2.39.5
|