android_kernel_samsung_a7y1.../sound/i2c
Philipp Klocke 6a1bd84ac7 ALSA: i2c/cs8427: Fix int to char conversion
[ Upstream commit eb7ebfa3c1989aa8e59d5e68ab3cddd7df1bfb27 ]

Compiling with clang yields the following warning:

sound/i2c/cs8427.c:140:31: warning: implicit conversion from 'int'
to 'char' changes value from 160 to -96 [-Wconstant-conversion]
    data[0] = CS8427_REG_AUTOINC | CS8427_REG_CORU_DATABUF;
            ~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

Because CS8427_REG_AUTOINC is defined as 128, it is too big for a
char field.
So change data from char to unsigned char, that it can hold the value.

This patch does not change the generated code.

Signed-off-by: Philipp Klocke <philipp97kl@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 12:35:00 +02:00
..
other ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls() 2020-04-07 07:38:09 +02:00
cs8427.c ALSA: i2c/cs8427: Fix int to char conversion 2020-04-07 12:35:00 +02:00
i2c.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tea6330t.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30