diff options
author | Joe Perches <joe@perches.com> | 2012-05-13 23:56:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-15 19:45:03 +0200 |
commit | e87cc4728f0e2fb663e592a1141742b1d6c63256 (patch) | |
tree | b8219696d37f0c8d0521d5853560b97fc96dc667 /net/ipv6/addrconf.c | |
parent | net: Add net_ratelimited_function and net_<level>_ratelimited macros (diff) | |
download | linux-e87cc4728f0e2fb663e592a1141742b1d6c63256.tar.xz linux-e87cc4728f0e2fb663e592a1141742b1d6c63256.zip |
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/addrconf.c')
-rw-r--r-- | net/ipv6/addrconf.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 8b7f100a4b45..4d1d51a0bd26 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -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; |