We will later move printk into its own header while giving it more
Linux-like semantics. Prepare for that by defining no_printf, so users
across the tree can make use of it without including <linux/printk.h>.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 include/printf.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/printf.h b/include/printf.h
index d111afacb63e..58793bc067dc 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -30,19 +30,20 @@ static inline __printf(1, 2) int printf(const char *fmt, 
...)
 void __noreturn panic(const char *fmt, ...) __printf(1, 2);
 void __noreturn panic_no_stacktrace(const char *fmt, ...) __printf(1, 2);
 
-#define printk                 printf
-
 /*
- * Dummy printk for disabled debugging statements to use whilst maintaining
+ * Dummy printf for disabled debugging statements to use whilst maintaining
  * gcc's format checking.
  */
-#define no_printk(fmt, ...)                            \
+#define no_printf(fmt, ...)                            \
 ({                                                     \
        if (0)                                          \
                printk(fmt, ##__VA_ARGS__);             \
        0;                                              \
 })
 
+#define printk                 printf
+#define no_printk              no_printf
+
 enum {
        DUMP_PREFIX_NONE,
        DUMP_PREFIX_ADDRESS,
-- 
2.47.3


Reply via email to