ASoC: nau8822: Fix incorrect type in assignment and cast to restricted __be16
authorDavid Lin <CTLIN0@nuvoton.com>
Fri, 17 Nov 2023 04:30:12 +0000 (12:30 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 17 Nov 2023 12:47:49 +0000 (12:47 +0000)
commitc1501f2597dd08601acd42256a4b0a0fc36bf302
tree98a1d4f3d172bf669ce9003ef5cfb6c3fb6b53fd
parentd5c65be34df73fa01ed05611aafb73b440d89e29
ASoC: nau8822: 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/nau8822.c:199:25: sparse: sparse: incorrect type in assignment
sound/soc/codecs/nau8822.c:199:25: sparse: expected unsigned short
sound/soc/codecs/nau8822.c:199:25: sparse: got restricted __be16
sound/soc/codecs/nau8822.c:235:25: sparse: sparse: cast to restricted __be16
sound/soc/codecs/nau8822.c:235:25: sparse: sparse: cast to restricted __be16
sound/soc/codecs/nau8822.c:235:25: sparse: sparse: cast to restricted __be16
sound/soc/codecs/nau8822.c:235:25: sparse: sparse: cast to restricted __be16

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311122320.T1opZVkP-lkp@intel.com/
Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20231117043011.1747594-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8822.c