exynos-linux-stable/sound/i2c
Philipp Klocke dfd1e70b03 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>
2019-11-28 18:28:29 +01:00
..
other ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls() 2019-10-05 12:30:19 +02:00
cs8427.c ALSA: i2c/cs8427: Fix int to char conversion 2019-11-28 18:28:29 +01:00
i2c.c ALSA: i2c: constify snd_i2c_ops structures 2015-11-30 11:40:08 +01:00
Makefile ALSA: drop outdated and broken sa11xx-uda1341 driver 2009-03-17 17:58:13 +01:00
tea6330t.c sound: Add module.h to the previously silent sound users 2011-10-31 19:31:21 -04:00