From: kernel test robot <lkp@intel.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/dma/qcom/gpi.c:1254:15: warning: iteration 2 invokes undefined behavior
Date: Sat, 2 Jan 2021 08:41:25 +0800 [thread overview]
Message-ID: <202101020822.cVPHn63Z-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2057 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: eda809aef53426d044b519405d25d9da55319b76
commit: 5d0c3533a19f48e5e7e73806a3e4b29cd4364130 dmaengine: qcom: Add GPI dma driver
date: 5 weeks ago
config: arm64-randconfig-p002-20210102 (attached as .config)
compiler: aarch64-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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5d0c3533a19f48e5e7e73806a3e4b29cd4364130
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 5d0c3533a19f48e5e7e73806a3e4b29cd4364130
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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/dma/qcom/gpi.c: In function 'gpi_alloc_chan_resources':
>> drivers/dma/qcom/gpi.c:1254:15: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
1254 | struct gpii *gpii = gchan->gpii;
| ^~~~
drivers/dma/qcom/gpi.c:1951:2: note: within this loop
1951 | for (i = i - 1; i >= 0; i++) {
| ^~~
vim +1254 drivers/dma/qcom/gpi.c
1251
1252 static int gpi_stop_chan(struct gchan *gchan)
1253 {
> 1254 struct gpii *gpii = gchan->gpii;
1255 int ret;
1256
1257 ret = gpi_send_cmd(gpii, gchan, GPI_CH_CMD_STOP);
1258 if (ret) {
1259 dev_err(gpii->gpi_dev->dev, "Error with cmd:%s ret:%d\n",
1260 TO_GPI_CMD_STR(GPI_CH_CMD_STOP), ret);
1261 return ret;
1262 }
1263
1264 return 0;
1265 }
1266
---
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: 31831 bytes --]
reply other threads:[~2021-01-02 0:43 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=202101020822.cVPHn63Z-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@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®