ASoC: nau8810: Fix incorrect type in assignment and cast to restricted __be16
authorDavid Lin <CTLIN0@nuvoton.com>
Mon, 20 Nov 2023 08:42:28 +0000 (16:42 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 20 Nov 2023 17:19:08 +0000 (17:19 +0000)
commitaf524e9dcb43f5914cecb3a3f4b79081d2e3f7f8
treea6b19f6a6ae0d7f55a9c10a25fe19434f743018c
parentcac15dc25f416972f8dd0b6a8d74daa79dc3a998
ASoC: nau8810: Fix incorrect type in assignment and cast to restricted __be16

This issue is reproduced when W=1 build in compiler gcc-12.
The following are sparse warnings:

sound/soc/codecs/nau8810.c:183:25: sparse: warning: incorrect type in assignment
sound/soc/codecs/nau8810.c:183:25: sparse: expected int
sound/soc/codecs/nau8810.c:183:25: sparse: got restricted __be16
sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16
sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16
sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16
sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16

This issue is not still actively checked by kernel test robot.
Actually, it is same with nau8822's sparse warnings issue.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20231120084227.1766633-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8810.c