diff options
author | Philipp Klocke <philipp97kl@gmail.com> | 2018-10-18 12:33:02 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-10-18 15:44:08 +0200 |
commit | eb7ebfa3c1989aa8e59d5e68ab3cddd7df1bfb27 (patch) | |
tree | 4cf2157f187d5485ee79f9bbd2c747feef56d273 /sound/soc/codecs/cs35l35.h | |
parent | ALSA: doc: Brush up the old writing-an-alsa-driver (diff) | |
download | linux-eb7ebfa3c1989aa8e59d5e68ab3cddd7df1bfb27.tar.xz linux-eb7ebfa3c1989aa8e59d5e68ab3cddd7df1bfb27.zip |
ALSA: i2c/cs8427: Fix int to char conversion
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>
Diffstat (limited to 'sound/soc/codecs/cs35l35.h')
0 files changed, 0 insertions, 0 deletions