aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-08-16 22:27:04 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-20 18:05:03 -0400
commitba3542e15cf8b9f3dee4c64a383c7102c0d8fab3 (patch)
tree72f83afb22b2ae929fb726e10fef97cdab3241ff /net/ipv6/addrconf.c
parentdcdc7a5929842ca0df91eb50de9edebbb5e4e7d1 (diff)
ipv6: convert the uses of ADBG and remove the superfluous parentheses
Just follow the Joe Perches's opinion, it is a better way to fix the style errors. Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Cc: 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.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index ad12f7c43f25..3ca23e89f517 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -99,9 +99,9 @@
99#define ACONF_DEBUG 2 99#define ACONF_DEBUG 2
100 100
101#if ACONF_DEBUG >= 3 101#if ACONF_DEBUG >= 3
102#define ADBG(x) printk x 102#define ADBG(fmt, ...) printk(fmt, ##__VA_ARGS__)
103#else 103#else
104#define ADBG(x) 104#define ADBG(fmt, ...) do { if (0) printk(fmt, ##__VA_ARGS__); } while (0)
105#endif 105#endif
106 106
107#define INFINITY_LIFE_TIME 0xFFFFFFFF 107#define INFINITY_LIFE_TIME 0xFFFFFFFF
@@ -374,9 +374,9 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
374 dev_hold(dev); 374 dev_hold(dev);
375 375
376 if (snmp6_alloc_dev(ndev) < 0) { 376 if (snmp6_alloc_dev(ndev) < 0) {
377 ADBG((KERN_WARNING 377 ADBG(KERN_WARNING
378 "%s: cannot allocate memory for statistics; dev=%s.\n", 378 "%s: cannot allocate memory for statistics; dev=%s.\n",
379 __func__, dev->name)); 379 __func__, dev->name);
380 neigh_parms_release(&nd_tbl, ndev->nd_parms); 380 neigh_parms_release(&nd_tbl, ndev->nd_parms);
381 dev_put(dev); 381 dev_put(dev);
382 kfree(ndev); 382 kfree(ndev);
@@ -384,9 +384,9 @@ static struct inet6_dev *ipv6_add_dev(struct net_device *dev)
384 } 384 }
385 385
386 if (snmp6_register_dev(ndev) < 0) { 386 if (snmp6_register_dev(ndev) < 0) {
387 ADBG((KERN_WARNING 387 ADBG(KERN_WARNING
388 "%s: cannot create /proc/net/dev_snmp6/%s\n", 388 "%s: cannot create /proc/net/dev_snmp6/%s\n",
389 __func__, dev->name)); 389 __func__, dev->name);
390 neigh_parms_release(&nd_tbl, ndev->nd_parms); 390 neigh_parms_release(&nd_tbl, ndev->nd_parms);
391 ndev->dead = 1; 391 ndev->dead = 1;
392 in6_dev_finish_destroy(ndev); 392 in6_dev_finish_destroy(ndev);
@@ -849,7 +849,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
849 849
850 /* Ignore adding duplicate addresses on an interface */ 850 /* Ignore adding duplicate addresses on an interface */
851 if (ipv6_chk_same_addr(dev_net(idev->dev), addr, idev->dev)) { 851 if (ipv6_chk_same_addr(dev_net(idev->dev), addr, idev->dev)) {
852 ADBG(("ipv6_add_addr: already assigned\n")); 852 ADBG("ipv6_add_addr: already assigned\n");
853 err = -EEXIST; 853 err = -EEXIST;
854 goto out; 854 goto out;
855 } 855 }
@@ -857,7 +857,7 @@ ipv6_add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
857 ifa = kzalloc(sizeof(struct inet6_ifaddr), GFP_ATOMIC); 857 ifa = kzalloc(sizeof(struct inet6_ifaddr), GFP_ATOMIC);
858 858
859 if (ifa == NULL) { 859 if (ifa == NULL) {
860 ADBG(("ipv6_add_addr: malloc failed\n")); 860 ADBG("ipv6_add_addr: malloc failed\n");
861 err = -ENOBUFS; 861 err = -ENOBUFS;
862 goto out; 862 goto out;
863 } 863 }
@@ -2057,7 +2057,7 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
2057 pinfo = (struct prefix_info *) opt; 2057 pinfo = (struct prefix_info *) opt;
2058 2058
2059 if (len < sizeof(struct prefix_info)) { 2059 if (len < sizeof(struct prefix_info)) {
2060 ADBG(("addrconf: prefix option too short\n")); 2060 ADBG("addrconf: prefix option too short\n");
2061 return; 2061 return;
2062 } 2062 }
2063 2063
@@ -3637,8 +3637,8 @@ restart:
3637 if (time_before(next_sched, jiffies + ADDRCONF_TIMER_FUZZ_MAX)) 3637 if (time_before(next_sched, jiffies + ADDRCONF_TIMER_FUZZ_MAX))
3638 next_sched = jiffies + ADDRCONF_TIMER_FUZZ_MAX; 3638 next_sched = jiffies + ADDRCONF_TIMER_FUZZ_MAX;
3639 3639
3640 ADBG((KERN_DEBUG "now = %lu, schedule = %lu, rounded schedule = %lu => %lu\n", 3640 ADBG(KERN_DEBUG "now = %lu, schedule = %lu, rounded schedule = %lu => %lu\n",
3641 now, next, next_sec, next_sched)); 3641 now, next, next_sec, next_sched);
3642 3642
3643 addr_chk_timer.expires = next_sched; 3643 addr_chk_timer.expires = next_sched;
3644 add_timer(&addr_chk_timer); 3644 add_timer(&addr_chk_timer);