projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5d51a6
)
tools include: Add some common function attributes
author
Mark Brown
<broonie@kernel.org>
Thu, 27 Jul 2023 23:26:14 +0000
(
00:26
+0100)
committer
Will Deacon
<will@kernel.org>
Fri, 4 Aug 2023 16:36:52 +0000
(17:36 +0100)
We don't have definitions of __always_unused or __noreturn in the tools
version of compiler.h, add them so we can use them in kselftests.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link:
https://lore.kernel.org/r/20230728-arm64-signal-memcpy-fix-v4-3-0c1290db5d46@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
tools/include/linux/compiler.h
patch
|
blob
|
history
diff --git
a/tools/include/linux/compiler.h
b/tools/include/linux/compiler.h
index
f75cced
..
1684216
100644
(file)
--- a/
tools/include/linux/compiler.h
+++ b/
tools/include/linux/compiler.h
@@
-42,6
+42,18
@@
# define __always_inline inline __attribute__((always_inline))
#endif
+#ifndef __always_unused
+#define __always_unused __attribute__((__unused__))
+#endif
+
+#ifndef __noreturn
+#define __noreturn __attribute__((__noreturn__))
+#endif
+
+#ifndef unreachable
+#define unreachable() __builtin_unreachable()
+#endif
+
#ifndef noinline
#define noinline
#endif