[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202004201540.vYPhhYMs%lkp@intel.com>
Date: Mon, 20 Apr 2020 15:53:46 +0800
From: kbuild test robot <lkp@...el.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>
Subject: sound/soc/soc-compress.c:75:28: warning: 'component' is used
uninitialized in this function
Hi Kuninori,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7a56db0299f9d43b4fe076838150c5cc293df131
commit: 613fb50059cf19aa6acbc503a00265d9151c0b09 ASoC: soc-core: remove snd_soc_rtdcom_list
date: 3 months ago
config: i386-randconfig-a002-20200420 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
git checkout 613fb50059cf19aa6acbc503a00265d9151c0b09
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
sound/soc/soc-compress.c: In function 'soc_compr_open':
>> sound/soc/soc-compress.c:75:28: warning: 'component' is used uninitialized in this function [-Wuninitialized]
struct snd_soc_component *component, *save = NULL;
^~~~~~~~~
vim +/component +75 sound/soc/soc-compress.c
1e57b82891ade3 Charles Keepax 2018-04-24 71
1e57b82891ade3 Charles Keepax 2018-04-24 72 static int soc_compr_open(struct snd_compr_stream *cstream)
1e57b82891ade3 Charles Keepax 2018-04-24 73 {
1e57b82891ade3 Charles Keepax 2018-04-24 74 struct snd_soc_pcm_runtime *rtd = cstream->private_data;
4137f4b65df760 Cezary Rojewski 2019-12-17 @75 struct snd_soc_component *component, *save = NULL;
1e57b82891ade3 Charles Keepax 2018-04-24 76 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
613fb50059cf19 Kuninori Morimoto 2020-01-10 77 int ret, i;
1e57b82891ade3 Charles Keepax 2018-04-24 78
613fb50059cf19 Kuninori Morimoto 2020-01-10 79 for_each_rtd_components(rtd, i, component) {
4137f4b65df760 Cezary Rojewski 2019-12-17 80 ret = pm_runtime_get_sync(component->dev);
4137f4b65df760 Cezary Rojewski 2019-12-17 81 if (ret < 0 && ret != -EACCES) {
4137f4b65df760 Cezary Rojewski 2019-12-17 82 pm_runtime_put_noidle(component->dev);
4137f4b65df760 Cezary Rojewski 2019-12-17 83 save = component;
4137f4b65df760 Cezary Rojewski 2019-12-17 84 goto pm_err;
4137f4b65df760 Cezary Rojewski 2019-12-17 85 }
4137f4b65df760 Cezary Rojewski 2019-12-17 86 }
4137f4b65df760 Cezary Rojewski 2019-12-17 87
72b745e3ad65de Peter Ujfalusi 2019-08-13 88 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
1e57b82891ade3 Charles Keepax 2018-04-24 89
1e57b82891ade3 Charles Keepax 2018-04-24 90 if (cpu_dai->driver->cops && cpu_dai->driver->cops->startup) {
1e57b82891ade3 Charles Keepax 2018-04-24 91 ret = cpu_dai->driver->cops->startup(cstream, cpu_dai);
1e57b82891ade3 Charles Keepax 2018-04-24 92 if (ret < 0) {
1e57b82891ade3 Charles Keepax 2018-04-24 93 dev_err(cpu_dai->dev,
1e57b82891ade3 Charles Keepax 2018-04-24 94 "Compress ASoC: can't open interface %s: %d\n",
1e57b82891ade3 Charles Keepax 2018-04-24 95 cpu_dai->name, ret);
1e57b82891ade3 Charles Keepax 2018-04-24 96 goto out;
1e57b82891ade3 Charles Keepax 2018-04-24 97 }
1e57b82891ade3 Charles Keepax 2018-04-24 98 }
1e57b82891ade3 Charles Keepax 2018-04-24 99
1e57b82891ade3 Charles Keepax 2018-04-24 100 ret = soc_compr_components_open(cstream, &component);
1e57b82891ade3 Charles Keepax 2018-04-24 101 if (ret < 0)
1e57b82891ade3 Charles Keepax 2018-04-24 102 goto machine_err;
9e7e3738ab0e90 Kuninori Morimoto 2017-10-11 103
1245b7005de02d Namarta Kohli 2012-08-16 104 if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->startup) {
1245b7005de02d Namarta Kohli 2012-08-16 105 ret = rtd->dai_link->compr_ops->startup(cstream);
1245b7005de02d Namarta Kohli 2012-08-16 106 if (ret < 0) {
141dfc9e3751f5 Charles Keepax 2018-01-26 107 dev_err(rtd->dev,
141dfc9e3751f5 Charles Keepax 2018-01-26 108 "Compress ASoC: %s startup failed: %d\n",
141dfc9e3751f5 Charles Keepax 2018-01-26 109 rtd->dai_link->name, ret);
1245b7005de02d Namarta Kohli 2012-08-16 110 goto machine_err;
1245b7005de02d Namarta Kohli 2012-08-16 111 }
1245b7005de02d Namarta Kohli 2012-08-16 112 }
1245b7005de02d Namarta Kohli 2012-08-16 113
24894b76468ed2 Lars-Peter Clausen 2014-03-05 114 snd_soc_runtime_activate(rtd, cstream->direction);
1245b7005de02d Namarta Kohli 2012-08-16 115
72b745e3ad65de Peter Ujfalusi 2019-08-13 116 mutex_unlock(&rtd->card->pcm_mutex);
15e2e6194a3ae1 Charles Keepax 2013-01-24 117
1245b7005de02d Namarta Kohli 2012-08-16 118 return 0;
1245b7005de02d Namarta Kohli 2012-08-16 119
1245b7005de02d Namarta Kohli 2012-08-16 120 machine_err:
1e57b82891ade3 Charles Keepax 2018-04-24 121 soc_compr_components_free(cstream, component);
9e7e3738ab0e90 Kuninori Morimoto 2017-10-11 122
2e622ae41e653c Vinod Koul 2016-11-13 123 if (cpu_dai->driver->cops && cpu_dai->driver->cops->shutdown)
2e622ae41e653c Vinod Koul 2016-11-13 124 cpu_dai->driver->cops->shutdown(cstream, cpu_dai);
1245b7005de02d Namarta Kohli 2012-08-16 125 out:
72b745e3ad65de Peter Ujfalusi 2019-08-13 126 mutex_unlock(&rtd->card->pcm_mutex);
4137f4b65df760 Cezary Rojewski 2019-12-17 127 pm_err:
613fb50059cf19 Kuninori Morimoto 2020-01-10 128 for_each_rtd_components(rtd, i, component) {
4137f4b65df760 Cezary Rojewski 2019-12-17 129 if (component == save)
4137f4b65df760 Cezary Rojewski 2019-12-17 130 break;
4137f4b65df760 Cezary Rojewski 2019-12-17 131 pm_runtime_mark_last_busy(component->dev);
4137f4b65df760 Cezary Rojewski 2019-12-17 132 pm_runtime_put_autosuspend(component->dev);
4137f4b65df760 Cezary Rojewski 2019-12-17 133 }
4137f4b65df760 Cezary Rojewski 2019-12-17 134
1245b7005de02d Namarta Kohli 2012-08-16 135 return ret;
1245b7005de02d Namarta Kohli 2012-08-16 136 }
1245b7005de02d Namarta Kohli 2012-08-16 137
:::::: The code at line 75 was first introduced by commit
:::::: 4137f4b65df7608e52f307f4aa9792b984bad7de ASoC: compress: Add pm_runtime support
:::::: TO: Cezary Rojewski <cezary.rojewski@...el.com>
:::::: CC: Mark Brown <broonie@...nel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (36022 bytes)
Powered by blists - more mailing lists