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: <20090209220959.GB15633@ioremap.net>
Date:	Tue, 10 Feb 2009 01:09:59 +0300
From:	Evgeniy Polyakov <zbr@...emap.net>
To:	Harvey Harrison <harvey.harrison@...il.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Ian Dall <ian@...are.dropbear.id.au>
Subject: Re: [1/1] w1: w1 temp calculation overflow fix.

On Mon, Feb 09, 2009 at 01:48:44PM -0800, Harvey Harrison (harvey.harrison@...il.com) wrote:
> >  {
> > -	s16 t = (rom[1] << 8) | rom[0];
> > +	int t = ((s16)rom[1] << 8) | rom[0];
> 
> Alternatively,
> 
> 	int t = (s16)le16_to_cpup((__le16 *)rom);

Well, yes, but for the consistency with the other conversation functions
I think above is more appropriate.

-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ