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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1227736144.5511.131.camel@brick>
Date:	Wed, 26 Nov 2008 13:49:04 -0800
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	steve@...gwyn.com
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	linux-netdev <netdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH-mm 8/8] decnet: remove private wrappers of endian
 helpers

On Wed, 2008-11-26 at 21:33 +0000, steve@...gwyn.com wrote:
> Hi,
> 
> On Wed, Nov 26, 2008 at 01:12:54PM -0800, Harvey Harrison wrote:
> > Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
> > ---
> [snip]
> > diff --git a/include/net/dn_fib.h b/include/net/dn_fib.h
> > index 3012511..c378be7 100644
> > --- a/include/net/dn_fib.h
> > +++ b/include/net/dn_fib.h
> > @@ -181,9 +181,9 @@ static inline void dn_fib_res_put(struct dn_fib_res *res)
> >  
> >  static inline __le16 dnet_make_mask(int n)
> >  {
> > -        if (n)
> > -                return dn_htons(~((1<<(16-n))-1));
> > -        return 0;
> > +	if (n)
> > +		return cpu_to_le16(~((1 << (16 - n)) - 1));
> > +	return cpu_to_le16(0);
> >  }
> You don't need to convert 0.

Tell that to sparse ;-)

> 
> [snip]
> >  
> > @@ -327,7 +327,7 @@ int dn_username2sockaddr(unsigned char *data, int len, struct sockaddr_dn *sdn,
> >  	int namel = 12;
> >  
> >  	sdn->sdn_objnum = 0;
> > -	sdn->sdn_objnamel = dn_htons(0);
> > +	sdn->sdn_objnamel = cpu_to_le16(0);
> Again, no need to convert 0 even though I did :-)

Again, sparse appreciates it.

> 
> Otherwise the patch looks good.
> 
> Reviewed-by: Steven Whitehouse <swhiteho@...hat.com>
> 

Thanks.

Harvey

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