Re: [PATCH] iio: imu: adis16400: Fix sign extension

From: Jonathan Cameron
Date: Mon Jan 26 2015 - 16:07:52 EST


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@xxxxxxxxxxxxxxxxxx>
>
> Acked-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
>
Applied to the fixes-togreg branch of iio.git and cc'd to stable.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/