lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 09 Jun 2012 12:53:13 -0700
From:	Joe Perches <joe@...ches.com>
To:	Alexander Smirnov <alex.bluesman.smirnov@...il.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 3/3] 6lowpan: remove excessive argument in
 pr_debug

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;
		}


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ