From: kbuild test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [block:for-5.8/drivers 62/115] drivers/nvme/host/fc.c:1533:22-26: ERROR: invalid reference to the index variable of the iterator on line 1511
Date: Sun, 10 May 2020 09:06:39 +0800 [thread overview]
Message-ID: <202005100935.eZP2cFU8%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4830 bytes --]
CC: kbuild-all(a)lists.01.org
TO: James Smart <jsmart2021@gmail.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Hannes Reinecke <hare@suse.de>
CC: Christoph Hellwig <hch@lst.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.8/drivers
head: 92decf118f1da4c866515f80387f9cf4d48611d6
commit: 14fd1e98afafc0027a6a86ea1962e31dceafb400 [62/115] nvme-fc: Add Disconnect Association Rcv support
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/nvme/host/fc.c:1533:22-26: ERROR: invalid reference to the index variable of the iterator on line 1511
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=14fd1e98afafc0027a6a86ea1962e31dceafb400
git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git remote update block
git checkout 14fd1e98afafc0027a6a86ea1962e31dceafb400
vim +1533 drivers/nvme/host/fc.c
14fd1e98afafc0 James Smart 2020-03-31 1497
14fd1e98afafc0 James Smart 2020-03-31 1498 static struct nvme_fc_ctrl *
14fd1e98afafc0 James Smart 2020-03-31 1499 nvme_fc_match_disconn_ls(struct nvme_fc_rport *rport,
14fd1e98afafc0 James Smart 2020-03-31 1500 struct nvmefc_ls_rcv_op *lsop)
14fd1e98afafc0 James Smart 2020-03-31 1501 {
14fd1e98afafc0 James Smart 2020-03-31 1502 struct fcnvme_ls_disconnect_assoc_rqst *rqst =
14fd1e98afafc0 James Smart 2020-03-31 1503 &lsop->rqstbuf->rq_dis_assoc;
14fd1e98afafc0 James Smart 2020-03-31 1504 struct nvme_fc_ctrl *ctrl, *ret = NULL;
14fd1e98afafc0 James Smart 2020-03-31 1505 struct nvmefc_ls_rcv_op *oldls = NULL;
14fd1e98afafc0 James Smart 2020-03-31 1506 u64 association_id = be64_to_cpu(rqst->associd.association_id);
14fd1e98afafc0 James Smart 2020-03-31 1507 unsigned long flags;
14fd1e98afafc0 James Smart 2020-03-31 1508
14fd1e98afafc0 James Smart 2020-03-31 1509 spin_lock_irqsave(&rport->lock, flags);
14fd1e98afafc0 James Smart 2020-03-31 1510
14fd1e98afafc0 James Smart 2020-03-31 @1511 list_for_each_entry(ctrl, &rport->ctrl_list, ctrl_list) {
14fd1e98afafc0 James Smart 2020-03-31 1512 if (!nvme_fc_ctrl_get(ctrl))
14fd1e98afafc0 James Smart 2020-03-31 1513 continue;
14fd1e98afafc0 James Smart 2020-03-31 1514 spin_lock(&ctrl->lock);
14fd1e98afafc0 James Smart 2020-03-31 1515 if (association_id == ctrl->association_id) {
14fd1e98afafc0 James Smart 2020-03-31 1516 oldls = ctrl->rcv_disconn;
14fd1e98afafc0 James Smart 2020-03-31 1517 ctrl->rcv_disconn = lsop;
14fd1e98afafc0 James Smart 2020-03-31 1518 ret = ctrl;
14fd1e98afafc0 James Smart 2020-03-31 1519 }
14fd1e98afafc0 James Smart 2020-03-31 1520 spin_unlock(&ctrl->lock);
14fd1e98afafc0 James Smart 2020-03-31 1521 if (ret)
14fd1e98afafc0 James Smart 2020-03-31 1522 /* leave the ctrl get reference */
14fd1e98afafc0 James Smart 2020-03-31 1523 break;
14fd1e98afafc0 James Smart 2020-03-31 1524 nvme_fc_ctrl_put(ctrl);
14fd1e98afafc0 James Smart 2020-03-31 1525 }
14fd1e98afafc0 James Smart 2020-03-31 1526
14fd1e98afafc0 James Smart 2020-03-31 1527 spin_unlock_irqrestore(&rport->lock, flags);
14fd1e98afafc0 James Smart 2020-03-31 1528
14fd1e98afafc0 James Smart 2020-03-31 1529 /* transmit a response for anything that was pending */
14fd1e98afafc0 James Smart 2020-03-31 1530 if (oldls) {
14fd1e98afafc0 James Smart 2020-03-31 1531 dev_info(rport->lport->dev,
14fd1e98afafc0 James Smart 2020-03-31 1532 "NVME-FC{%d}: Multiple Disconnect Association "
14fd1e98afafc0 James Smart 2020-03-31 @1533 "LS's received\n", ctrl->cnum);
14fd1e98afafc0 James Smart 2020-03-31 1534 /* overwrite good response with bogus failure */
14fd1e98afafc0 James Smart 2020-03-31 1535 oldls->lsrsp->rsplen = nvme_fc_format_rjt(oldls->rspbuf,
14fd1e98afafc0 James Smart 2020-03-31 1536 sizeof(*oldls->rspbuf),
14fd1e98afafc0 James Smart 2020-03-31 1537 rqst->w0.ls_cmd,
14fd1e98afafc0 James Smart 2020-03-31 1538 FCNVME_RJT_RC_UNAB,
14fd1e98afafc0 James Smart 2020-03-31 1539 FCNVME_RJT_EXP_NONE, 0);
14fd1e98afafc0 James Smart 2020-03-31 1540 nvme_fc_xmt_ls_rsp(oldls);
14fd1e98afafc0 James Smart 2020-03-31 1541 }
14fd1e98afafc0 James Smart 2020-03-31 1542
14fd1e98afafc0 James Smart 2020-03-31 1543 return ret;
14fd1e98afafc0 James Smart 2020-03-31 1544 }
14fd1e98afafc0 James Smart 2020-03-31 1545
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2020-05-10 1:06 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=202005100935.eZP2cFU8%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@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.