net: Convert net_ratelimit uses to net_<level>_ratelimited
Standardize the net core ratelimited logging functions. Coalesce formats, align arguments. Change a printk then vprintk sequence to use printf extension %pV. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
3a3bfb61e6
commit
e87cc4728f
@@ -1415,9 +1415,8 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp)
|
||||
return;
|
||||
}
|
||||
|
||||
if (net_ratelimit())
|
||||
printk(KERN_INFO "%s: IPv6 duplicate address %pI6c detected!\n",
|
||||
ifp->idev->dev->name, &ifp->addr);
|
||||
net_info_ratelimited("%s: IPv6 duplicate address %pI6c detected!\n",
|
||||
ifp->idev->dev->name, &ifp->addr);
|
||||
|
||||
if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6) {
|
||||
struct in6_addr addr;
|
||||
@@ -1847,16 +1846,15 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
|
||||
prefered_lft = ntohl(pinfo->prefered);
|
||||
|
||||
if (prefered_lft > valid_lft) {
|
||||
if (net_ratelimit())
|
||||
printk(KERN_WARNING "addrconf: prefix option has invalid lifetime\n");
|
||||
net_warn_ratelimited("addrconf: prefix option has invalid lifetime\n");
|
||||
return;
|
||||
}
|
||||
|
||||
in6_dev = in6_dev_get(dev);
|
||||
|
||||
if (in6_dev == NULL) {
|
||||
if (net_ratelimit())
|
||||
printk(KERN_DEBUG "addrconf: device %s not configured\n", dev->name);
|
||||
net_dbg_ratelimited("addrconf: device %s not configured\n",
|
||||
dev->name);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1931,9 +1929,8 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
|
||||
}
|
||||
goto ok;
|
||||
}
|
||||
if (net_ratelimit())
|
||||
printk(KERN_DEBUG "IPv6 addrconf: prefix with wrong length %d\n",
|
||||
pinfo->prefix_len);
|
||||
net_dbg_ratelimited("IPv6 addrconf: prefix with wrong length %d\n",
|
||||
pinfo->prefix_len);
|
||||
in6_dev_put(in6_dev);
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user