[PATCH net-next] Simplify net_dbg_ratelimited() dummy

Subsystems: networking [general], the rest

STALE883d

3 messages, 3 authors, 2024-03-01 · open the first message on its own page

[PATCH net-next] Simplify net_dbg_ratelimited() dummy

From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: 2024-02-28 14:05:11

There is no need to wrap calls to the no_printk() helper inside an
always-false check, as no_printk() already does that internally.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 include/linux/net.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/linux/net.h b/include/linux/net.h
index c9b4a63791a45948..15df6d5f27a7badc 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -299,10 +299,7 @@ do {									\
 	net_ratelimited_function(pr_debug, fmt, ##__VA_ARGS__)
 #else
 #define net_dbg_ratelimited(fmt, ...)				\
-	do {							\
-		if (0)						\
-			no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__); \
-	} while (0)
+	no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
 #endif
 
 #define net_get_random_once(buf, nbytes)			\
-- 
2.34.1

Re: [PATCH net-next] Simplify net_dbg_ratelimited() dummy

From: Jiri Pirko <jiri@resnulli.us>
Date: 2024-02-28 15:43:29

Wed, Feb 28, 2024 at 03:05:29PM CET, geert+renesas@glider.be wrote:
There is no need to wrap calls to the no_printk() helper inside an
always-false check, as no_printk() already does that internally.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jiri Pirko <redacted>

Re: [PATCH net-next] Simplify net_dbg_ratelimited() dummy

From: patchwork-bot+netdevbpf@kernel.org
Date: 2024-03-01 08:50:31

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller [off-list ref]:

On Wed, 28 Feb 2024 15:05:29 +0100 you wrote:
There is no need to wrap calls to the no_printk() helper inside an
always-false check, as no_printk() already does that internally.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 include/linux/net.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
Here is the summary with links:
  - [net-next] Simplify net_dbg_ratelimited() dummy
    https://git.kernel.org/netdev/net-next/c/f29f9199c2d2

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help