diff options
author | Philipp Klocke <philipp97kl@gmail.com> | 2018-10-18 12:33:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-28 18:28:29 +0100 |
commit | dfd1e70b0322df10a350d91a56e98d4dc351751f (patch) | |
tree | 7a77888574cfaac39918d67047c7d3ca043d3675 /drivers/macintosh | |
parent | 6058799c7043577b2324e25f50fed1e26f822198 (diff) |
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>
Diffstat (limited to 'drivers/macintosh')
0 files changed, 0 insertions, 0 deletions