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
@@ -794,9 +794,7 @@ static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort,
|
||||
goto retry;
|
||||
}
|
||||
|
||||
if (net_ratelimit())
|
||||
printk(KERN_WARNING
|
||||
"ipv6: Neighbour table overflow.\n");
|
||||
net_warn_ratelimited("ipv6: Neighbour table overflow\n");
|
||||
dst_free(&rt->dst);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1643,9 +1641,7 @@ void rt6_redirect(const struct in6_addr *dest, const struct in6_addr *src,
|
||||
rt = ip6_route_redirect(dest, src, saddr, neigh->dev);
|
||||
|
||||
if (rt == net->ipv6.ip6_null_entry) {
|
||||
if (net_ratelimit())
|
||||
printk(KERN_DEBUG "rt6_redirect: source isn't a valid nexthop "
|
||||
"for redirect target\n");
|
||||
net_dbg_ratelimited("rt6_redirect: source isn't a valid nexthop for redirect target\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -2106,9 +2102,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
|
||||
int err;
|
||||
|
||||
if (!rt) {
|
||||
if (net_ratelimit())
|
||||
pr_warning("IPv6: Maximum number of routes reached,"
|
||||
" consider increasing route/max_size.\n");
|
||||
net_warn_ratelimited("IPv6: Maximum number of routes reached, consider increasing route/max_size\n");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user