Re: [PATCH net-next v3 3/3] 6lowpan: remove excessive argument in pr_debug
From: Joe Perches <joe@perches.com>
Date: 2012-06-09 19:53:14
On Sat, 2012-06-09 at 12:37 -0700, Joe Perches wrote:
On Sat, 2012-06-09 at 19:13 +0400, Alexander Smirnov wrote:quoted
Remove excessive __func__ argument in pr_debug function.
[]
quoted
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
[]
quoted
@@ -543,7 +541,7 @@ static int lowpan_header_create(struct sk_buff *skb, hc06_ptr += 16; } } else { - pr_debug("(%s): destination address is unicast: ", __func__); + pr_debug("destination address is unicast: "); /* TODO: context lookup */ if (is_addr_link_local(&hdr->daddr)) { pr_debug("destination address is link-local\n");This doesn't really look correct. Should this be newline terminated?
Instead of:
pr_debug("destination address is unicast: ");
/* TODO: context lookup */
if (is_addr_link_local(&hdr->daddr)) {
pr_debug("destination address is link-local\n");
iphc1 |= lowpan_compress_addr_64(&hc06_ptr,
LOWPAN_IPHC_DAM_BIT, &hdr->daddr, daddr);
} else {
pr_debug("using full address\n");
memcpy(hc06_ptr, &hdr->daddr.s6_addr16[0], 16);
hc06_ptr += 16;
}
Perhaps something like the below is better:
/* TODO: context lookup */
if (is_addr_link_local(&hdr->daddr)) {
pr_debug("destination address is unicast and link-local\n");
iphc1 |= lowpan_compress_addr_64(&hc06_ptr,
LOWPAN_IPHC_DAM_BIT, &hdr->daddr, daddr);
} else {
pr_debug("destination address is unicast: using full address\n");
memcpy(hc06_ptr, &hdr->daddr.s6_addr16[0], 16);
hc06_ptr += 16;
}