netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/3] 6lowpan: remove excessive argument in pr_debug
Date: Sat, 09 Jun 2012 12:53:13 -0700	[thread overview]
Message-ID: <1339271593.8170.10.camel@joe2Laptop> (raw)
In-Reply-To: <1339270662.8170.6.camel@joe2Laptop>

On Sat, 2012-06-09 at 12:37 -0700, Joe Perches wrote:
> On Sat, 2012-06-09 at 19:13 +0400, Alexander Smirnov wrote:
> > Remove excessive __func__ argument in pr_debug function.
[]
> > diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
[]
> > @@ -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;
		}

  reply	other threads:[~2012-06-09 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-09 15:13 [PATCH net-next v3 0/3] 6lowpan fixes Alexander Smirnov
2012-06-09 15:13 ` [PATCH net-next v3 1/3] 6lowpan: read data from skb safely Alexander Smirnov
2012-06-09 15:13 ` [PATCH net-next v3 2/3] 6lowpan: fix hop limit compression Alexander Smirnov
2012-06-09 15:13 ` [PATCH net-next v3 3/3] 6lowpan: remove excessive argument in pr_debug Alexander Smirnov
2012-06-09 19:37   ` Joe Perches
2012-06-09 19:53     ` Joe Perches [this message]
2012-06-13  8:38 ` [PATCH v2 " Alexander Smirnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1339271593.8170.10.camel@joe2Laptop \
    --to=joe@perches.com \
    --cc=alex.bluesman.smirnov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).