lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] iio: imu: adis16400: Fix sign extension
On 23/01/15 08:56, Lars-Peter Clausen wrote:
> On 01/23/2015 12:34 AM, Rasmus Villemoes wrote:
>> The intention is obviously to sign-extend a 12 bit quantity. But
>> because of C's promotion rules, the assignment is equivalent to "val16
>> &= 0xfff;". Use the proper API for this.
>>
>> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
>
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
>
Applied to the fixes-togreg branch of iio.git and cc'd to stable.


\
 
 \ /
  Last update: 2015-01-26 22:21    [W:0.223 / U:1.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site