Heikki Orsila wrote: > Here's a small patch to cleanup NETDEBUG() use in net/ipv4/ for Linux > kernel 2.6.13-rc5. Also weird use of indentation is changed in some > places. > > --- > diff -urp linux-2.6.13-rc5-org/net/ipv4/icmp.c linux-2.6.13-rc5/net/ipv4/icmp.c > --- linux-2.6.13-rc5-org/net/ipv4/icmp.c 2005-08-02 07:45:48.000000000 +0300 > +++ linux-2.6.13-rc5/net/ipv4/icmp.c 2005-08-07 15:10:42.000000000 +0300 > @@ -936,8 +936,7 @@ int icmp_rcv(struct sk_buff *skb) > case CHECKSUM_HW: > if (!(u16)csum_fold(skb->csum)) > break; > - NETDEBUG(if (net_ratelimit()) > - printk(KERN_DEBUG "icmp v4 hw csum failure\n")); > + LIMIT_NETDEBUG(printk(KERN_DEBUG "icmp v4 hw csum failure\n")); > case CHECKSUM_NONE: > if ((u16)csum_fold(skb_checksum(skb, 0, skb->len, 0))) > goto error; These macros always looked a bit ugly to me, with your cleanup there isn't a single spot left where we require them to accept code as argument, so how about we change them to pure printk wrappers?