summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/moxart_timer.c
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2015-01-23 00:09:56 +0100
committerJonathan Cameron <jic23@kernel.org>2015-01-26 22:04:27 +0100
commitf7067a5ad717d4dbb4faa3ec56744152f6ba97ad (patch)
treef1d5da341b0f9d7d8b7a26b1ba0fafd913bb2a13 /drivers/clocksource/moxart_timer.c
parentiio: mxs-lradc: only update the buffer when its conversions have finished (diff)
downloadlinux-f7067a5ad717d4dbb4faa3ec56744152f6ba97ad.tar.xz
linux-f7067a5ad717d4dbb4faa3ec56744152f6ba97ad.zip
staging: iio: ad2s1200: Fix sign extension
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@rasmusvillemoes.dk> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/clocksource/moxart_timer.c')
0 files changed, 0 insertions, 0 deletions