Skip to content

Commit

Permalink
Simplify net_dbg_ratelimited() dummy
Browse files Browse the repository at this point in the history
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 <jiri@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Geert Uytterhoeven authored and David S. Miller committed Mar 1, 2024
1 parent 9f780ef commit f29f919
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions include/linux/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit f29f919

Please sign in to comment.