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>
This commit is contained in:
committed by
David S. Miller
parent
82251de2a2
commit
f32138319c
@@ -24,6 +24,8 @@
|
||||
* Fixed routing subtrees.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "IPv6: " fmt
|
||||
|
||||
#include <linux/capability.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/export.h>
|
||||
@@ -794,7 +796,7 @@ static struct rt6_info *rt6_alloc_cow(struct rt6_info *ort,
|
||||
goto retry;
|
||||
}
|
||||
|
||||
net_warn_ratelimited("ipv6: Neighbour table overflow\n");
|
||||
net_warn_ratelimited("Neighbour table overflow\n");
|
||||
dst_free(&rt->dst);
|
||||
return NULL;
|
||||
}
|
||||
@@ -1280,7 +1282,7 @@ int ip6_route_add(struct fib6_config *cfg)
|
||||
!(cfg->fc_nlinfo.nlh->nlmsg_flags & NLM_F_CREATE)) {
|
||||
table = fib6_get_table(net, cfg->fc_table);
|
||||
if (!table) {
|
||||
printk(KERN_WARNING "IPv6: NLM_F_CREATE should be specified when creating new route\n");
|
||||
pr_warn("NLM_F_CREATE should be specified when creating new route\n");
|
||||
table = fib6_new_table(net, cfg->fc_table);
|
||||
}
|
||||
} else {
|
||||
@@ -2102,7 +2104,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
|
||||
int err;
|
||||
|
||||
if (!rt) {
|
||||
net_warn_ratelimited("IPv6: Maximum number of routes reached, consider increasing route/max_size\n");
|
||||
net_warn_ratelimited("Maximum number of routes reached, consider increasing route/max_size\n");
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user