From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [broonie-misc:asoc-5.14 5/23] sound/soc/qcom/qdsp6/q6afe.c:1213:18: warning: variable 'port_id' is uninitialized when used here
Date: Wed, 12 May 2021 01:59:43 +0800 [thread overview]
Message-ID: <202105120137.4D1sa7ck-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6158 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git asoc-5.14
head: ae062a711aa2485fc4f6fe48cdb7229c849f2568
commit: 5f1b95d08de712327e452d082a50fded435ec884 [5/23] ASoC: q6dsp: q6afe: remove unneeded dead-store initialization
config: x86_64-randconfig-r006-20210511 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a0fed635fe1701470062495a6ffee1c608f3f1bc)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git/commit/?id=5f1b95d08de712327e452d082a50fded435ec884
git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
git fetch --no-tags broonie-misc asoc-5.14
git checkout 5f1b95d08de712327e452d082a50fded435ec884
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> sound/soc/qcom/qdsp6/q6afe.c:1213:18: warning: variable 'port_id' is uninitialized when used here [-Wuninitialized]
stop->port_id = port_id;
^~~~~~~
sound/soc/qcom/qdsp6/q6afe.c:1186:13: note: initialize the variable 'port_id' to silence this warning
int port_id;
^
= 0
1 warning generated.
vim +/port_id +1213 sound/soc/qcom/qdsp6/q6afe.c
a4ae3af59bd585 Srinivas Kandagatla 2018-05-18 1173
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1174 /**
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1175 * q6afe_port_stop() - Stop a afe port
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1176 *
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1177 * @port: Instance of port to stop
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1178 *
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1179 * Return: Will be an negative on packet size on success.
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1180 */
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1181 int q6afe_port_stop(struct q6afe_port *port)
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1182 {
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1183 struct afe_port_cmd_device_stop *stop;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1184 struct q6afe *afe = port->afe;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1185 struct apr_pkt *pkt;
5f1b95d08de712 Yang Li 2021-04-25 1186 int port_id;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1187 int ret = 0;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1188 int index, pkt_size;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1189 void *p;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1190
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1191 index = port->token;
c54c1c5ee8e73b Dan Carpenter 2018-06-27 1192 if (index < 0 || index >= AFE_PORT_MAX) {
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1193 dev_err(afe->dev, "AFE port index[%d] invalid!\n", index);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1194 return -EINVAL;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1195 }
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1196
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1197 pkt_size = APR_HDR_SIZE + sizeof(*stop);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1198 p = kzalloc(pkt_size, GFP_KERNEL);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1199 if (!p)
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1200 return -ENOMEM;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1201
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1202 pkt = p;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1203 stop = p + APR_HDR_SIZE;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1204
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1205 pkt->hdr.hdr_field = APR_HDR_FIELD(APR_MSG_TYPE_SEQ_CMD,
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1206 APR_HDR_LEN(APR_HDR_SIZE),
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1207 APR_PKT_VER);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1208 pkt->hdr.pkt_size = pkt_size;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1209 pkt->hdr.src_port = 0;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1210 pkt->hdr.dest_port = 0;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1211 pkt->hdr.token = index;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1212 pkt->hdr.opcode = AFE_PORT_CMD_DEVICE_STOP;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 @1213 stop->port_id = port_id;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1214 stop->reserved = 0;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1215
342a4f8ca12b1c Srinivas Kandagatla 2020-09-10 1216 ret = afe_apr_send_pkt(afe, pkt, port, AFE_PORT_CMD_DEVICE_STOP);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1217 if (ret)
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1218 dev_err(afe->dev, "AFE close failed %d\n", ret);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1219
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1220 kfree(pkt);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1221 return ret;
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1222 }
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1223 EXPORT_SYMBOL_GPL(q6afe_port_stop);
7fa2d70f976657 Srinivas Kandagatla 2018-05-18 1224
:::::: The code at line 1213 was first introduced by commit
:::::: 7fa2d70f976657111a5ea4f3d16a738ddaa10c4f ASoC: qdsp6: q6afe: Add q6afe driver
:::::: TO: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
:::::: CC: Mark Brown <broonie@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 47162 bytes --]
next reply other threads:[~2021-05-11 17:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 17:59 kernel test robot [this message]
2021-05-11 18:23 ` [broonie-misc:asoc-5.14 5/23] sound/soc/qcom/qdsp6/q6afe.c:1213:18: warning: variable 'port_id' is uninitialized when used here Nathan Chancellor
2021-05-11 18:32 ` Mark Brown
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=202105120137.4D1sa7ck-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/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.