Skip to contentSkip to conversation

printk: include pr_fmt in pr_debug_ratelimited

PATCH New Jason A. Donenfeld 1 participant 1 message Jul 19, 2015 Printk

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 printk: include pr_fmt in pr_debug_ratelimited

The other two implementations of pr_debug_ratelimited include pr_fmt, along with every other pr_* function. But pr_debug_ratelimited forgot to add it with the CONFIG_DYNAMIC_DEBUG implementation.

This patch unifies the behavior.

---
 include/linux/printk.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/printk.h +2 -2
index 58b1fec..5ec50cd 100644
@@ -404,10 +404,10 @@ do {									\
 	static DEFINE_RATELIMIT_STATE(_rs,				\
 				      DEFAULT_RATELIMIT_INTERVAL,	\
 				      DEFAULT_RATELIMIT_BURST);		\
-	DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);			\
+	DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, pr_fmt(fmt));		\
 	if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) &&	\
 	    __ratelimit(&_rs))						\
-		__dynamic_pr_debug(&descriptor, fmt, ##__VA_ARGS__);	\
+		__dynamic_pr_debug(&descriptor, pr_fmt(fmt), ##__VA_ARGS__);	\
 } while (0)
 #elif defined(DEBUG)
 #define pr_debug_ratelimited(fmt, ...)					\
Signature · 1 line
2.4.5