From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [linux-next:master 1145/4316] sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret'
Date: Tue, 08 Sep 2026 19:16:42 +0800 [thread overview]
Message-ID: <202609081933.K4tVJnyh-lkp@intel.com> (raw)
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
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: oe-kbuild@lists.linux.dev, Neo Chang <YLCHANG2@nuvoton.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
Mark Brown <broonie@kernel.org>
Subject: [linux-next:master 1145/4316] sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret'
Date: Thu, 10 Sep 2026 17:20:07 +0300 [thread overview]
Message-ID: <202609081933.K4tVJnyh-lkp@intel.com> (raw)
Message-ID: <20260910142007.Z8C9NWP-H15d1kNoMklRu7GjfSH0oE8B201Sexg5SrI@z> (raw)
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
next reply other threads:[~2026-09-08 11:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 11:16 kernel test robot [this message]
2026-09-10 14:20 ` [linux-next:master 1145/4316] sound/soc/codecs/nau8360-dsp.c:214 nau8360_message_to_dsp() warn: missing error code? 'ret' Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609081933.K4tVJnyh-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.