Skip to content
Commit 78b75ab3 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

iio: chemical: sps30: Explicity truncate constant by masking



When breaking up a constant to write to two 8 bit registers
it isn't obvious to sparse that it was intentional.

CHECK   drivers/iio/chemical/sps30.c
drivers/iio/chemical/sps30.c:120:30: warning: cast truncates bits from constant value (8004 becomes 4)

So in the interests of minimising noisy warnings, let us add
a mask.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: default avatarTomasz Duszynski <tduszyns@gmail.com>
parent 47f3b26e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment