From: kernel test robot <lkp@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [morimoto:sound-cleanup-2026-07-17-2 301/301] sound/soc/codecs/wm_adsp_fw_find_test.c:280:48: warning: variable 'test_dev' is uninitialized when used here
Date: Sun, 19 Jul 2026 02:01:50 +0800 [thread overview]
Message-ID: <202607190112.eofUgdqV-lkp@intel.com> (raw)
tree: https://github.com/morimoto/linux sound-cleanup-2026-07-17-2
head: 0031be0dff2c86cbb204c3d1bb5ee9797cb9cb53
commit: 9c663d9f6ce80b79e42d5b9ae67b3f980bfceaa0 [301/301] ASoC: add test-hack method
config: i386-randconfig-007-20260718 (https://download.01.org/0day-ci/archive/20260719/202607190112.eofUgdqV-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260719/202607190112.eofUgdqV-lkp@intel.com/reproduce)
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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607190112.eofUgdqV-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> sound/soc/codecs/wm_adsp_fw_find_test.c:280:48: warning: variable 'test_dev' is uninitialized when used here [-Wuninitialized]
280 | priv->dsp.component = snd_soc_component_alloc(test_dev);
| ^~~~~~~~
sound/soc/codecs/wm_adsp_fw_find_test.c:272:25: note: initialize the variable 'test_dev' to silence this warning
272 | struct device *test_dev;
| ^
| = NULL
1 warning generated.
vim +/test_dev +280 sound/soc/codecs/wm_adsp_fw_find_test.c
268
269 static int wm_adsp_fw_find_test_case_init(struct kunit *test)
270 {
271 struct wm_adsp_fw_find_test *priv;
272 struct device *test_dev;
273 int ret;
274
275 priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
276 if (!priv)
277 return -ENOMEM;
278
279 /* Require dummy struct snd_soc_component for the alsa name prefix string */
> 280 priv->dsp.component = snd_soc_component_alloc(test_dev);
281 if (!priv->dsp.component)
282 return -ENOMEM;
283
284 test->priv = priv;
285
286 /* Create dummy amp device */
287 test_dev = kunit_device_register(test, "wm_adsp_test_drv");
288 if (IS_ERR(test_dev))
289 return PTR_ERR(test_dev);
290
291 priv->dsp.cs_dsp.dev = get_device(test_dev);
292 if (!priv->dsp.cs_dsp.dev)
293 return -ENODEV;
294
295 ret = kunit_add_action_or_reset(test, _put_device_wrapper, priv->dsp.cs_dsp.dev);
296 if (ret)
297 return ret;
298
299 return 0;
300 }
301
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-07-18 18:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202607190112.eofUgdqV-lkp@intel.com \
--to=lkp@intel.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox