* [linux-next:master 1145/4316] sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret'
@ 2026-09-10 14:20 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-09-08 11:16 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Neo Chang <YLCHANG2@nuvoton.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 944a035ecca915ae947905dcfb03f2b9dc6d032c
commit: be88847a8bb1a14194cf50116f8909d127861318 [1145/4316] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier
:::::: branch date: 20 hours ago
:::::: commit date: 9 days ago
config: arm-randconfig-r071-20260908 (https://download.01.org/0day-ci/archive/20260908/202609081933.K4tVJnyh-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 2362eeb5f75560740146975e9eabe84c6bd25a0d)
smatch: v0.5.0-9187-g5189e3fb
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202609081933.K4tVJnyh-lkp@intel.com/
smatch warnings:
sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret'
sound/soc/codecs/nau8360.c:2203 nau8360_alloc_defaults() warn: potentially one past the end of array 'dyn_defaults[idx]'
sound/soc/codecs/nau8360.c:2203 nau8360_alloc_defaults() warn: potentially one past the end of array 'dyn_defaults[idx]'
vim +/ret +214 sound/soc/codecs/nau8360-dsp.c
be88847a8bb1a1 Neo Chang 2026-08-25 197
be88847a8bb1a1 Neo Chang 2026-08-25 198 static int nau8360_message_to_dsp(struct snd_soc_component *cp,
be88847a8bb1a1 Neo Chang 2026-08-25 199 const struct nau8360_cmd_info *cmd_info, int frag_len, int param_offset,
be88847a8bb1a1 Neo Chang 2026-08-25 200 int param_size, void *param_data, unsigned short dsp_addr)
be88847a8bb1a1 Neo Chang 2026-08-25 201 {
be88847a8bb1a1 Neo Chang 2026-08-25 202 unsigned int payload;
be88847a8bb1a1 Neo Chang 2026-08-25 203 int ret, padding = 0, frag_cnt = 0;
be88847a8bb1a1 Neo Chang 2026-08-25 204
be88847a8bb1a1 Neo Chang 2026-08-25 205 ret = nau8360_dsp_idle(cp, dsp_addr);
be88847a8bb1a1 Neo Chang 2026-08-25 206 if (ret)
be88847a8bb1a1 Neo Chang 2026-08-25 207 return ret;
be88847a8bb1a1 Neo Chang 2026-08-25 208
be88847a8bb1a1 Neo Chang 2026-08-25 209 /* sending preamble fragment */
be88847a8bb1a1 Neo Chang 2026-08-25 210 payload = nau8360_pack_preamble(cmd_info->cmd_id, frag_len);
be88847a8bb1a1 Neo Chang 2026-08-25 211 snd_soc_component_write(cp, dsp_addr, payload);
be88847a8bb1a1 Neo Chang 2026-08-25 212
be88847a8bb1a1 Neo Chang 2026-08-25 213 if (!cmd_info->msg_param)
be88847a8bb1a1 Neo Chang 2026-08-25 @214 return ret;
be88847a8bb1a1 Neo Chang 2026-08-25 215
be88847a8bb1a1 Neo Chang 2026-08-25 216 /* sending payload + padding */
be88847a8bb1a1 Neo Chang 2026-08-25 217 payload = nau8360_pack_param(param_offset, param_size);
be88847a8bb1a1 Neo Chang 2026-08-25 218 snd_soc_component_write(cp, dsp_addr, payload);
be88847a8bb1a1 Neo Chang 2026-08-25 219 frag_cnt++;
be88847a8bb1a1 Neo Chang 2026-08-25 220
be88847a8bb1a1 Neo Chang 2026-08-25 221 if (cmd_info->setup_data)
be88847a8bb1a1 Neo Chang 2026-08-25 222 nau8360_send_data_payload(cp, dsp_addr, param_data, param_size,
be88847a8bb1a1 Neo Chang 2026-08-25 223 &frag_cnt, &padding);
be88847a8bb1a1 Neo Chang 2026-08-25 224
be88847a8bb1a1 Neo Chang 2026-08-25 225 /* sending trailing fragment */
be88847a8bb1a1 Neo Chang 2026-08-25 226 frag_cnt++;
be88847a8bb1a1 Neo Chang 2026-08-25 227 payload = nau8360_pack_trailing(frag_cnt, padding);
be88847a8bb1a1 Neo Chang 2026-08-25 228 snd_soc_component_write(cp, dsp_addr, payload);
be88847a8bb1a1 Neo Chang 2026-08-25 229
be88847a8bb1a1 Neo Chang 2026-08-25 230 if (frag_cnt != frag_len) {
be88847a8bb1a1 Neo Chang 2026-08-25 231 dev_err(cp->dev, "message error (CMD_ID 0x%x, LEN 0x%x) !!!",
be88847a8bb1a1 Neo Chang 2026-08-25 232 cmd_info->cmd_id, frag_cnt);
be88847a8bb1a1 Neo Chang 2026-08-25 233 return -EPROTO;
be88847a8bb1a1 Neo Chang 2026-08-25 234 }
be88847a8bb1a1 Neo Chang 2026-08-25 235
be88847a8bb1a1 Neo Chang 2026-08-25 236 return 0;
be88847a8bb1a1 Neo Chang 2026-08-25 237 }
be88847a8bb1a1 Neo Chang 2026-08-25 238
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread* [linux-next:master 1145/4316] sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret'
@ 2026-09-10 14:20 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-09-10 14:20 UTC (permalink / raw)
To: oe-kbuild, Neo Chang; +Cc: lkp, oe-kbuild-all, Mark Brown
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 944a035ecca915ae947905dcfb03f2b9dc6d032c
commit: be88847a8bb1a14194cf50116f8909d127861318 [1145/4316] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier
config: arm-randconfig-r071-20260908 (https://download.01.org/0day-ci/archive/20260908/202609081933.K4tVJnyh-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 2362eeb5f75560740146975e9eabe84c6bd25a0d)
smatch: v0.5.0-9187-g5189e3fb
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202609081933.K4tVJnyh-lkp@intel.com/
smatch warnings:
sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret'
vim +/ret +214 sound/soc/codecs/nau8360-dsp.c
be88847a8bb1a1 Neo Chang 2026-08-25 198 static int nau8360_message_to_dsp(struct snd_soc_component *cp,
be88847a8bb1a1 Neo Chang 2026-08-25 199 const struct nau8360_cmd_info *cmd_info, int frag_len, int param_offset,
be88847a8bb1a1 Neo Chang 2026-08-25 200 int param_size, void *param_data, unsigned short dsp_addr)
be88847a8bb1a1 Neo Chang 2026-08-25 201 {
be88847a8bb1a1 Neo Chang 2026-08-25 202 unsigned int payload;
be88847a8bb1a1 Neo Chang 2026-08-25 203 int ret, padding = 0, frag_cnt = 0;
be88847a8bb1a1 Neo Chang 2026-08-25 204
be88847a8bb1a1 Neo Chang 2026-08-25 205 ret = nau8360_dsp_idle(cp, dsp_addr);
be88847a8bb1a1 Neo Chang 2026-08-25 206 if (ret)
be88847a8bb1a1 Neo Chang 2026-08-25 207 return ret;
be88847a8bb1a1 Neo Chang 2026-08-25 208
be88847a8bb1a1 Neo Chang 2026-08-25 209 /* sending preamble fragment */
be88847a8bb1a1 Neo Chang 2026-08-25 210 payload = nau8360_pack_preamble(cmd_info->cmd_id, frag_len);
be88847a8bb1a1 Neo Chang 2026-08-25 211 snd_soc_component_write(cp, dsp_addr, payload);
be88847a8bb1a1 Neo Chang 2026-08-25 212
be88847a8bb1a1 Neo Chang 2026-08-25 213 if (!cmd_info->msg_param)
be88847a8bb1a1 Neo Chang 2026-08-25 @214 return ret;
Please either change this to "return 0;" or "return -ERROR;"
be88847a8bb1a1 Neo Chang 2026-08-25 215
be88847a8bb1a1 Neo Chang 2026-08-25 216 /* sending payload + padding */
be88847a8bb1a1 Neo Chang 2026-08-25 217 payload = nau8360_pack_param(param_offset, param_size);
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-10 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 11:16 [linux-next:master 1145/4316] sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret' kernel test robot
2026-09-10 14:20 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.