diff options
author | Joe Perches <joe@perches.com> | 2012-05-13 17:56:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-15 13:45:03 -0400 |
commit | e87cc4728f0e2fb663e592a1141742b1d6c63256 (patch) | |
tree | b8219696d37f0c8d0521d5853560b97fc96dc667 /net/ipv6/addrconf.c | |
parent | 3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c (diff) |
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) | |||
1415 | return; | 1415 | return; |
1416 | } | 1416 | } |
1417 | 1417 | ||
1418 | if (net_ratelimit()) | 1418 | net_info_ratelimited("%s: IPv6 duplicate address %pI6c detected!\n", |
1419 | printk(KERN_INFO "%s: IPv6 duplicate address %pI6c detected!\n", | 1419 | ifp->idev->dev->name, &ifp->addr); |
1420 | ifp->idev->dev->name, &ifp->addr); | ||
1421 | 1420 | ||
1422 | if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6) { | 1421 | if (idev->cnf.accept_dad > 1 && !idev->cnf.disable_ipv6) { |
1423 | struct in6_addr addr; | 1422 | struct in6_addr addr; |
@@ -1847,16 +1846,15 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao) | |||
1847 | prefered_lft = ntohl(pinfo->prefered); | 1846 | prefered_lft = ntohl(pinfo->prefered); |
1848 | 1847 | ||
1849 | if (prefered_lft > valid_lft) { | 1848 | if (prefered_lft > valid_lft) { |
1850 | if (net_ratelimit()) | 1849 | net_warn_ratelimited("addrconf: prefix option has invalid lifetime\n"); |
1851 | printk(KERN_WARNING "addrconf: prefix option has invalid lifetime\n"); | ||
1852 | return; | 1850 | return; |
1853 | } | 1851 | } |
1854 | 1852 | ||
1855 | in6_dev = in6_dev_get(dev); | 1853 | in6_dev = in6_dev_get(dev); |
1856 | 1854 | ||
1857 | if (in6_dev == NULL) { | 1855 | if (in6_dev == NULL) { |
1858 | if (net_ratelimit()) | 1856 | net_dbg_ratelimited("addrconf: device %s not configured\n", |
1859 | printk(KERN_DEBUG "addrconf: device %s not configured\n", dev->name); | 1857 | dev->name); |
1860 | return; | 1858 | return; |
1861 | } | 1859 | } |
1862 | 1860 | ||
@@ -1931,9 +1929,8 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao) | |||
1931 | } | 1929 | } |
1932 | goto ok; | 1930 | goto ok; |
1933 | } | 1931 | } |
1934 | if (net_ratelimit()) | 1932 | net_dbg_ratelimited("IPv6 addrconf: prefix with wrong length %d\n", |
1935 | printk(KERN_DEBUG "IPv6 addrconf: prefix with wrong length %d\n", | 1933 | pinfo->prefix_len); |
1936 | pinfo->prefix_len); | ||
1937 | in6_dev_put(in6_dev); | 1934 | in6_dev_put(in6_dev); |
1938 | return; | 1935 | return; |
1939 | 1936 | ||