From: kernel test robot <lkp@intel.com>
To: Arun Kumar Neelakantam <aneela@codeaurora.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: drivers/soc/qcom/qcom_aoss.c:228:9: warning: variable 'tlen' set but not used
Date: Mon, 10 Aug 2020 22:49:25 +0800 [thread overview]
Message-ID: <202008102223.YGiZDZtB%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2911 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fc80c51fd4b23ec007e88d4c688f2cac1b8648e7
commit: 89e7eddece6140020749932f9647a6068cc0d56d soc: qcom: aoss: Read back before triggering the IRQ
date: 6 months ago
config: nds32-randconfig-r031-20200810 (attached as .config)
compiler: nds32le-linux-gcc (GCC) 9.3.0
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
git checkout 89e7eddece6140020749932f9647a6068cc0d56d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
drivers/soc/qcom/qcom_aoss.c: In function 'qmp_send':
>> drivers/soc/qcom/qcom_aoss.c:228:9: warning: variable 'tlen' set but not used [-Wunused-but-set-variable]
228 | size_t tlen;
| ^~~~
vim +/tlen +228 drivers/soc/qcom/qcom_aoss.c
212
213 /**
214 * qmp_send() - send a message to the AOSS
215 * @qmp: qmp context
216 * @data: message to be sent
217 * @len: length of the message
218 *
219 * Transmit @data to AOSS and wait for the AOSS to acknowledge the message.
220 * @len must be a multiple of 4 and not longer than the mailbox size. Access is
221 * synchronized by this implementation.
222 *
223 * Return: 0 on success, negative errno on failure
224 */
225 static int qmp_send(struct qmp *qmp, const void *data, size_t len)
226 {
227 long time_left;
> 228 size_t tlen;
229 int ret;
230
231 if (WARN_ON(len + sizeof(u32) > qmp->size))
232 return -EINVAL;
233
234 if (WARN_ON(len % sizeof(u32)))
235 return -EINVAL;
236
237 mutex_lock(&qmp->tx_lock);
238
239 /* The message RAM only implements 32-bit accesses */
240 __iowrite32_copy(qmp->msgram + qmp->offset + sizeof(u32),
241 data, len / sizeof(u32));
242 writel(len, qmp->msgram + qmp->offset);
243
244 /* Read back len to confirm data written in message RAM */
245 tlen = readl(qmp->msgram + qmp->offset);
246 qmp_kick(qmp);
247
248 time_left = wait_event_interruptible_timeout(qmp->event,
249 qmp_message_empty(qmp), HZ);
250 if (!time_left) {
251 dev_err(qmp->dev, "ucore did not ack channel\n");
252 ret = -ETIMEDOUT;
253
254 /* Clear message from buffer */
255 writel(0, qmp->msgram + qmp->offset);
256 } else {
257 ret = 0;
258 }
259
260 mutex_unlock(&qmp->tx_lock);
261
262 return ret;
263 }
264
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29891 bytes --]
reply other threads:[~2020-08-10 14:50 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=202008102223.YGiZDZtB%lkp@intel.com \
--to=lkp@intel.com \
--cc=aneela@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®