aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2012-05-15 10:11:53 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-16 01:01:03 -0400
commitf32138319ca6541e65f95f8e17c9cc88ac1baf94 (patch)
tree20505f3d5955d89d3763a6182052a8e9b37eaf37 /net/ipv6/ip6_fib.c
parent82251de2a2b7b84987dde104d48a765b63170149 (diff)
net: ipv6: Standardize prefixes for message logging
Add #define pr_fmt(fmt) as appropriate. Add "IPv6: " to appropriate files. Convert printk(KERN_<LEVEL> to pr_<level> (but not KERN_DEBUG). Standardize on "%s: " not "%s(): " when emitting __func__. Use "%s: ", __func__ instead of embedding function name. Coalesce formats, align arguments. ADDRCONF output is now prefixed with "IPv6: " Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 93717435013e..e9846da77424 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -18,6 +18,9 @@
18 * routing table. 18 * routing table.
19 * Ville Nuorvala: Fixed routing subtrees. 19 * Ville Nuorvala: Fixed routing subtrees.
20 */ 20 */
21
22#define pr_fmt(fmt) "IPv6: " fmt
23
21#include <linux/errno.h> 24#include <linux/errno.h>
22#include <linux/types.h> 25#include <linux/types.h>
23#include <linux/net.h> 26#include <linux/net.h>
@@ -451,12 +454,10 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
451 !ipv6_prefix_equal(&key->addr, addr, fn->fn_bit)) { 454 !ipv6_prefix_equal(&key->addr, addr, fn->fn_bit)) {
452 if (!allow_create) { 455 if (!allow_create) {
453 if (replace_required) { 456 if (replace_required) {
454 pr_warn("IPv6: Can't replace route, " 457 pr_warn("Can't replace route, no match found\n");
455 "no match found\n");
456 return ERR_PTR(-ENOENT); 458 return ERR_PTR(-ENOENT);
457 } 459 }
458 pr_warn("IPv6: NLM_F_CREATE should be set " 460 pr_warn("NLM_F_CREATE should be set when creating new route\n");
459 "when creating new route\n");
460 } 461 }
461 goto insert_above; 462 goto insert_above;
462 } 463 }
@@ -499,11 +500,10 @@ static struct fib6_node * fib6_add_1(struct fib6_node *root, void *addr,
499 * That would keep IPv6 consistent with IPv4 500 * That would keep IPv6 consistent with IPv4
500 */ 501 */
501 if (replace_required) { 502 if (replace_required) {
502 pr_warn("IPv6: Can't replace route, no match found\n"); 503 pr_warn("Can't replace route, no match found\n");
503 return ERR_PTR(-ENOENT); 504 return ERR_PTR(-ENOENT);
504 } 505 }
505 pr_warn("IPv6: NLM_F_CREATE should be set " 506 pr_warn("NLM_F_CREATE should be set when creating new route\n");
506 "when creating new route\n");
507 } 507 }
508 /* 508 /*
509 * We walked to the bottom of tree. 509 * We walked to the bottom of tree.
@@ -696,7 +696,7 @@ static int fib6_add_rt2node(struct fib6_node *fn, struct rt6_info *rt,
696 */ 696 */
697 if (!replace) { 697 if (!replace) {
698 if (!add) 698 if (!add)
699 pr_warn("IPv6: NLM_F_CREATE should be set when creating new route\n"); 699 pr_warn("NLM_F_CREATE should be set when creating new route\n");
700 700
701add: 701add:
702 rt->dst.rt6_next = iter; 702 rt->dst.rt6_next = iter;
@@ -715,7 +715,7 @@ add:
715 if (!found) { 715 if (!found) {
716 if (add) 716 if (add)
717 goto add; 717 goto add;
718 pr_warn("IPv6: NLM_F_REPLACE set, but no existing node found!\n"); 718 pr_warn("NLM_F_REPLACE set, but no existing node found!\n");
719 return -ENOENT; 719 return -ENOENT;
720 } 720 }
721 *ins = rt; 721 *ins = rt;
@@ -768,7 +768,7 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
768 replace_required = 1; 768 replace_required = 1;
769 } 769 }
770 if (!allow_create && !replace_required) 770 if (!allow_create && !replace_required)
771 pr_warn("IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE\n"); 771 pr_warn("RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE\n");
772 772
773 fn = fib6_add_1(root, &rt->rt6i_dst.addr, sizeof(struct in6_addr), 773 fn = fib6_add_1(root, &rt->rt6i_dst.addr, sizeof(struct in6_addr),
774 rt->rt6i_dst.plen, offsetof(struct rt6_info, rt6i_dst), 774 rt->rt6i_dst.plen, offsetof(struct rt6_info, rt6i_dst),