diff options
author | Sven Eckelmann <sven.eckelmann@gmx.de> | 2010-07-06 19:05:17 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-08 19:23:29 (GMT) |
commit | c1641862f88367602f8f34a17b21bdf1eee912ee (patch) | |
tree | 22cf98b87d41bf5437ca8fcf7d53f29ebc544809 /drivers/staging/batman-adv/routing.c | |
parent | 84ec08640786592a045b783fb28b542415521bf9 (diff) | |
download | linux-fsl-qoriq-c1641862f88367602f8f34a17b21bdf1eee912ee.tar.xz |
Staging: batman-adv: Move printk to simplified macros
Each general printk which is not informative by itself for a specific
batX device were moved to pr_(info|warning|err) as it provides an easy
interface which for example resolves the problem to add the prefix
"batman-adv: " before each line.
All information which is specific to a batX device will be printed using
a bat_(info|err|warning) macro to prefix it also with "batman-adv:
batX:" in each line.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/routing.c')
-rw-r--r-- | drivers/staging/batman-adv/routing.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/staging/batman-adv/routing.c b/drivers/staging/batman-adv/routing.c index 418ae09..066cc91 100644 --- a/drivers/staging/batman-adv/routing.c +++ b/drivers/staging/batman-adv/routing.c @@ -859,10 +859,9 @@ static int recv_icmp_ttl_exceeded(struct sk_buff *skb, size_t icmp_len) /* send TTL exceeded if packet is an echo request (traceroute) */ if (icmp_packet->msg_type != ECHO_REQUEST) { - printk(KERN_WARNING "batman-adv:" - "Warning - can't forward icmp packet from %pM to %pM: " - "ttl exceeded\n", - icmp_packet->orig, icmp_packet->dst); + pr_warning("Warning - can't forward icmp packet from %pM to " + "%pM: ttl exceeded\n", icmp_packet->orig, + icmp_packet->dst); return NET_RX_DROP; } @@ -1134,10 +1133,9 @@ int recv_unicast_packet(struct sk_buff *skb, struct batman_if *recv_if) /* TTL exceeded */ if (unicast_packet->ttl < 2) { - printk(KERN_WARNING "batman-adv:Warning - " - "can't forward unicast packet from %pM to %pM: " - "ttl exceeded\n", - ethhdr->h_source, unicast_packet->dest); + pr_warning("Warning - can't forward unicast packet from %pM to " + "%pM: ttl exceeded\n", ethhdr->h_source, + unicast_packet->dest); return NET_RX_DROP; } |