]> git.baikalelectronics.ru Git - kernel.git/commit
iio: bmi160_core: Fix sparse warning due to incorrect type in assignment
authorsayli karnik <karniksayli1995@gmail.com>
Tue, 11 Oct 2016 11:37:21 +0000 (17:07 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:33:44 +0000 (19:33 +0100)
commit8afdf68553e77752bede902dd4a1d08d0db9d63c
tree236126422e9f445aa4da250056e6c2efc241a1fc
parent573afda4526d902e51cc37e596010ceacdc11eeb
iio: bmi160_core: Fix sparse warning due to incorrect type in assignment

There is a type mismatch between the buffer which is of type s16 and the
samples stored, which are declared as __le16.

Fix the following sparse warning:
drivers/iio/imu/bmi160/bmi160_core.c:411:26: warning: incorrect type
in assignment (different base types)

drivers/iio/imu/bmi160/bmi160_core.c:411:26: expected signed short
[signed] [short] [explicitly-signed] <noident>
drivers/iio/imu/bmi160/bmi160_core.c:411:26: got restricted __le16
[addressable] [usertype] sample

This is a cosmetic-type patch since it does not alter code behaviour.
The le16 is going into a 16bit buf element, and is labelled as IIO_LE in the
channel buffer definition.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/bmi160/bmi160_core.c