[agd5f:audio-for-next 68/153] sound/soc/codecs/cs35l41.c:217:13: warning: variable 'ret' set but not used
From: kernel test robot
Date: Tue Aug 24 2021 - 21:40:27 EST
tree: https://gitlab.freedesktop.org/agd5f/linux.git audio-for-next
head: b50aaad40c792ec71a1d51622bc50aca608e8b55
commit: f1f622b8f1b3270f77b95c5c62eafa985526f4b7 [68/153] ASoC: cs35l41: Enable HALO DSP reset from mixer control
config: riscv-randconfig-r033-20210824 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f audio-for-next
git checkout f1f622b8f1b3270f77b95c5c62eafa985526f4b7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
sound/soc/codecs/cs35l41.c: In function 'cs35l41_ccm_reset_put':
>> sound/soc/codecs/cs35l41.c:217:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
217 | int ret = 0;
| ^~~
sound/soc/codecs/cs35l41.c: In function 'cs35l41_dsp_init':
sound/soc/codecs/cs35l41.c:2088:12: error: 'struct wm_adsp' has no member named 'n_rx_channels'
2088 | dsp->n_rx_channels = CS35L41_DSP_N_RX_RATES;
| ^~
sound/soc/codecs/cs35l41.c:2089:12: error: 'struct wm_adsp' has no member named 'n_tx_channels'
2089 | dsp->n_tx_channels = CS35L41_DSP_N_TX_RATES;
| ^~
sound/soc/codecs/cs35l41.c:2092:15: error: too many arguments to function 'wm_halo_init'
2092 | ret = wm_halo_init(dsp, &cs35l41->rate_lock);
| ^~~~~~~~~~~~
In file included from sound/soc/codecs/cs35l41.c:44:
sound/soc/codecs/wm_adsp.h:166:5: note: declared here
166 | int wm_halo_init(struct wm_adsp *dsp);
| ^~~~~~~~~~~~
sound/soc/codecs/cs35l41.c:2096:20: error: 'struct wm_adsp' has no member named 'rx_rate_cache'
2096 | dsp->rx_rate_cache[i] = 0x1;
| ^~
sound/soc/codecs/cs35l41.c:2098:20: error: 'struct wm_adsp' has no member named 'tx_rate_cache'
2098 | dsp->tx_rate_cache[i] = 0x1;
| ^~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from sound/soc/codecs/cs35l41.c:15:
sound/soc/codecs/cs35l41.c: In function 'cs35l41_dsp_load_ev':
include/linux/compiler.h:56:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^
sound/soc/codecs/cs35l41.c:174:17: note: in expansion of macro 'if'
174 | if (cs35l41->halo_booted == false) {
| ^~
sound/soc/codecs/cs35l41.c:178:9: note: here
178 | default:
| ^~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/list.h:9,
from include/linux/module.h:12,
from sound/soc/codecs/cs35l41.c:15:
sound/soc/codecs/cs35l41.c: In function 'cs35l41_dsp_power_ev':
include/linux/compiler.h:56:26: warning: this statement may fall through [-Wimplicit-fallthrough=]
56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
| ^
sound/soc/codecs/cs35l41.c:157:17: note: in expansion of macro 'if'
157 | if (cs35l41->halo_booted == false) {
| ^~
sound/soc/codecs/cs35l41.c:161:9: note: here
161 | default:
| ^~~~~~~
vim +/ret +217 sound/soc/codecs/cs35l41.c
210
211 static int cs35l41_ccm_reset_put(struct snd_kcontrol *kcontrol,
212 struct snd_ctl_elem_value *ucontrol)
213 {
214 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
215 struct cs35l41_private *cs35l41 = snd_soc_component_get_drvdata(component);
216 unsigned int val = 0;
> 217 int ret = 0;
218
219 val = ucontrol->value.integer.value[0];
220
221 if (val) {
222 ret = regmap_update_bits(cs35l41->regmap, CS35L41_DSP_CLK_CTRL,
223 0x3, 0x2);
224 ret = regmap_update_bits(cs35l41->regmap,
225 CS35L41_DSP1_CCM_CORE_CTRL,
226 CS35L41_HALO_CORE_RESET, CS35L41_HALO_CORE_RESET);
227 ret = regmap_update_bits(cs35l41->regmap, CS35L41_DSP_CLK_CTRL,
228 0x3, 0x3);
229 }
230
231 return 0;
232 }
233
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip