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] [day] [month] [year] [list]
Message-ID: <54C6AC0F.8030202@kernel.org>
Date:	Mon, 26 Jan 2015 21:05:19 +0000
From:	Jonathan Cameron <jic23@...nel.org>
To:	Lars-Peter Clausen <lars@...afoo.de>,
	Rasmus Villemoes <linux@...musvillemoes.dk>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	Hartmut Knaack <knaack.h@....de>,
	Peter Meerwald <pmeerw@...erw.net>, linux-iio@...r.kernel.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: iio: ad2s1200: Fix sign extension

On 23/01/15 08:56, Lars-Peter Clausen wrote:
> On 01/23/2015 12:09 AM, Rasmus Villemoes wrote:
>> The line above makes vel a 12-bit quantity (st->rx[] is u8). The
>> intention is to sign-extend vel using bit 11 as the sign bit. But
>> because of C's promotion rules "vel = (vel << 4) >> 4;" is actually a
>> no-op, since vel is promoted to int before the inner
>> shift. sign_extend32 works equally well for 8 and 16 bits types, so
>> use that.
>>
>> Signed-off-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> 
> Acked-by: Lars-Peter Clausen <lars@...afoo.de>
Applied to fixes-togreg branch of iio.git.

Thanks,

Jonathan

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