From: Geert Uytterhoeven Date: Wed, 28 Feb 2024 14:05:29 +0000 (+0100) Subject: Simplify net_dbg_ratelimited() dummy X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f29f9199c2d2b3c258f577f438885288016847ed;p=linux.git Simplify net_dbg_ratelimited() dummy 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 Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/include/linux/net.h b/include/linux/net.h index c9b4a63791a45..15df6d5f27a7b 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) \