aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/compiler.h6
-rw-r--r--lib/Kconfig.debug8
2 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index c811c8b979ac..c68b67b86ef1 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -101,6 +101,12 @@ extern void __chk_io_ptr(const volatile void __iomem *);
101#undef __must_check 101#undef __must_check
102#define __must_check 102#define __must_check
103#endif 103#endif
104#ifndef CONFIG_ENABLE_WARN_DEPRECATED
105#undef __deprecated
106#undef __deprecated_for_modules
107#define __deprecated
108#define __deprecated_for_modules
109#endif
104 110
105/* 111/*
106 * Allow us to avoid 'defined but not used' warnings on functions and data, 112 * Allow us to avoid 'defined but not used' warnings on functions and data,
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 1faa5087dc86..1e5f207b9074 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -9,6 +9,14 @@ config PRINTK_TIME
9 operations. This is useful for identifying long delays 9 operations. This is useful for identifying long delays
10 in kernel startup. 10 in kernel startup.
11 11
12config ENABLE_WARN_DEPRECATED
13 bool "Enable __deprecated logic"
14 default y
15 help
16 Enable the __deprecated logic in the kernel build.
17 Disable this to suppress the "warning: 'foo' is deprecated
18 (declared at kernel/power/somefile.c:1234)" messages.
19
12config ENABLE_MUST_CHECK 20config ENABLE_MUST_CHECK
13 bool "Enable __must_check logic" 21 bool "Enable __must_check logic"
14 default y 22 default y