mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
compiler: Introduce __always_unused
I wrote some code which is used as compile-time checker, and the code should be elided after compile. So I need to annotate the code as "always unused", compared to "maybe unused". Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> LKML-Reference: <4AEE2CEC.8040206@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
c4b8ac2c1a
commit
7b2a35132a
2 changed files with 5 additions and 0 deletions
|
@ -79,6 +79,7 @@
|
|||
#define noinline __attribute__((noinline))
|
||||
#define __attribute_const__ __attribute__((__const__))
|
||||
#define __maybe_unused __attribute__((unused))
|
||||
#define __always_unused __attribute__((unused))
|
||||
|
||||
#define __gcc_header(x) #x
|
||||
#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue