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

From: Lars-Peter Clausen
Date: Fri Jan 23 2015 - 04:02:41 EST


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>

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