浏览代码

s390/compiler.h Fix sparse vs. hotpatch

sparse does not understand the s390 specific hotpatch attribute and
floods the log with messages like
include/uapi/linux/swab.h:92:8: error: attribute 'hotpatch': unknown attribute

Let's just dont use it, if __CHECKER__ is defined.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Christian Borntraeger 9 年之前
父节点
当前提交
0c5a69f432
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/compiler.h

+ 1 - 1
include/linux/compiler.h

@@ -56,7 +56,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
 #include <linux/compiler-gcc.h>
 #include <linux/compiler-gcc.h>
 #endif
 #endif
 
 
-#ifdef CC_USING_HOTPATCH
+#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__)
 #define notrace __attribute__((hotpatch(0,0)))
 #define notrace __attribute__((hotpatch(0,0)))
 #else
 #else
 #define notrace __attribute__((no_instrument_function))
 #define notrace __attribute__((no_instrument_function))