summaryrefslogtreecommitdiff
path: root/sound/soc/sof/imx
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2022-08-23 18:19:40 +0300
committerMark Brown <broonie@kernel.org>2022-08-24 00:54:30 +0300
commit7d3ac70d82080f7a934402d66c5238e1d99be412 (patch)
tree0e06d315f4ba66c14719bdeb58593d16f34a7236 /sound/soc/sof/imx
parent3b99852f4c874062295704dd483b03cab61301fe (diff)
downloadlinux-7d3ac70d82080f7a934402d66c5238e1d99be412.tar.xz
ASoC: codes: src4xxx: Avoid clang -Wsometimes-uninitialized in src4xxx_hw_params()
Clang warns: sound/soc/codecs/src4xxx.c:280:3: error: variable 'd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/codecs/src4xxx.c:298:59: note: uninitialized use occurs here ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_11, d); ^ sound/soc/codecs/src4xxx.c:223:20: note: initialize the variable 'd' to silence this warning int val, pj, jd, d; ^ = 0 sound/soc/codecs/src4xxx.c:280:3: error: variable 'jd' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/codecs/src4xxx.c:293:59: note: uninitialized use occurs here ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_10, jd); ^~ sound/soc/codecs/src4xxx.c:223:17: note: initialize the variable 'jd' to silence this warning int val, pj, jd, d; ^ = 0 sound/soc/codecs/src4xxx.c:280:3: error: variable 'pj' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ sound/soc/codecs/src4xxx.c:288:59: note: uninitialized use occurs here ret = regmap_write(src4xxx->regmap, SRC4XXX_RCV_PLL_0F, pj); ^~ sound/soc/codecs/src4xxx.c:223:13: note: initialize the variable 'pj' to silence this warning int val, pj, jd, d; ^ = 0 3 errors generated. The datasheet does not have any default values for these regmap values so pick some arbitrary values and print to the user that this is the case to silence the warnings. Link: https://github.com/ClangBuiltLinux/linux/issues/1691 Reported-by: kernel test robot <lkp@intel.com> Reported-by: "Sudip Mukherjee (Codethink)" <sudipm.mukherjee@gmail.com> Suggested-by: Matt Flax <flatmax@flatmax.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Matt Flax <flatmax@flatmax.com> Link: https://lore.kernel.org/r/20220823151939.2493697-1-nathan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/imx')
0 files changed, 0 insertions, 0 deletions