summaryrefslogtreecommitdiff
path: root/include/linux/compiler_attributes.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-01-13 17:56:59 +0000
committerMark Brown <broonie@kernel.org>2021-01-13 17:56:59 +0000
commit2d446c98cde3ffccfd14849b7dda4194ab62dd20 (patch)
tree9b7f048dcddec04d94527132834fc056745fdb6d /include/linux/compiler_attributes.h
parent44a4cfad8d78efcda9ec0dd97ceea38d8b602f24 (diff)
parent7c53f6b671f4aba70ff15e1b05148b10d58c2837 (diff)
Merge v5.11-rc3
Diffstat (limited to 'include/linux/compiler_attributes.h')
-rw-r--r--include/linux/compiler_attributes.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/compiler_attributes.h b/include/linux/compiler_attributes.h
index b2a3f4f641a7..ea5e04e75845 100644
--- a/include/linux/compiler_attributes.h
+++ b/include/linux/compiler_attributes.h
@@ -273,6 +273,12 @@
#define __used __attribute__((__used__))
/*
+ * gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-warn_005funused_005fresult-function-attribute
+ * clang: https://clang.llvm.org/docs/AttributeReference.html#nodiscard-warn-unused-result
+ */
+#define __must_check __attribute__((__warn_unused_result__))
+
+/*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-weak-function-attribute
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-weak-variable-attribute
*/