sctp has several points in its setsockopt path in which it issues deprecation
warnings.  It seems like it might be handy to macrotize such a warning so other
subsystems can use it easily

Signed-off-by: Neil Horman <[email protected]>
CC: Greg Kroah-Hartman <[email protected]>
CC: "David S. Miller" <[email protected]>
CC: [email protected]
---
 include/linux/printk.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/printk.h b/include/linux/printk.h
index 6949258..2e043b3 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -336,6 +336,9 @@ extern asmlinkage void dump_stack(void) __cold;
        printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 /* no pr_cont_ratelimited, don't do that... */
 
+#define pr_warn_deprecated(fmt, ...)                                   \
+       pr_warn_ratelimited("Deprecated: " fmt, ##__VA_ARGS__)
+
 #if defined(DEBUG)
 #define pr_devel_ratelimited(fmt, ...)                                 \
        printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to