Commit:     de48844398f81cfdf087d56e12c920d620dae8d5
Parent:     c67c36e4b86872ac875716d502748b84b2541de5
Author:     Jeff Garzik <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 25 04:06:13 2007 -0400
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 15:10:17 2007 -0700

    Permit silencing of __deprecated warnings.
    The __deprecated marker is quite useful in highlighting the remnants of
    old APIs that want removing.
    However, it is quite normal for one or more years to pass, before the
    (usually ancient, bitrotten) code in question is either updated or
    Thus, like __must_check, add a Kconfig option that permits the silencing
    of this compiler warning.
    This change mimics the ifdef-ery and Kconfig defaults of MUST_CHECK as
    closely as possible.
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/linux/compiler.h |    6 ++++++
 lib/Kconfig.debug        |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index c811c8b..c68b67b 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -101,6 +101,12 @@ extern void __chk_io_ptr(const volatile void __iomem *);
 #undef __must_check
 #define __must_check
+#undef __deprecated
+#undef __deprecated_for_modules
+#define __deprecated
+#define __deprecated_for_modules
  * Allow us to avoid 'defined but not used' warnings on functions and data,
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 1faa508..1e5f207 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -9,6 +9,14 @@ config PRINTK_TIME
          operations.  This is useful for identifying long delays
          in kernel startup.
+       bool "Enable __deprecated logic"
+       default y
+       help
+         Enable the __deprecated logic in the kernel build.
+         Disable this to suppress the "warning: 'foo' is deprecated
+         (declared at kernel/power/somefile.c:1234)" messages.
        bool "Enable __must_check logic"
        default y
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to