diff options
author | Joe Perches <joe@perches.com> | 2012-05-13 21:56:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-15 13:45:03 -0400 |
commit | e87cc4728f0e2fb663e592a1141742b1d6c63256 (patch) | |
tree | b8219696d37f0c8d0521d5853560b97fc96dc667 /net/ipv6/route.c | |
parent | 3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c (diff) | |
download | linux-e87cc4728f0e2fb663e592a1141742b1d6c63256.tar.bz2 |
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>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 0aefc36f74c7..e20e32069024 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -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); } |