Skip to content

Commit c0560b9

Browse files
JoePerchesdavem330
authored andcommitted
dccp: Convert DCCP_WARN to net_warn_ratelimited
Remove the dependency on the "warning" sysctl (net_msg_warn) which is only used by the LIMIT_NETDEBUG macro. Convert the LIMIT_NETDEBUG use in DCCP_WARN to the more common net_warn_ratelimited mechanism. This still ratelimits based on the net_ratelimit() function, but removes the check for the sysctl. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 36cbb24 commit c0560b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/dccp/dccp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
/*
2323
* DCCP - specific warning and debugging macros.
2424
*/
25-
#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \
26-
__func__, ##a)
25+
#define DCCP_WARN(fmt, ...) \
26+
net_warn_ratelimited("%s: " fmt, __func__, ##__VA_ARGS__)
2727
#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
2828
__FILE__, __LINE__, __func__)
2929
#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)

0 commit comments

Comments
 (0)