From: kernel test robot <lkp@intel.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Jens Axboe <axboe@kernel.dk>
Subject: [axboe-block:for-5.17/drivers 77/78] drivers/block/null_blk/main.c:1577:55: sparse: sparse: incorrect type in argument 3 (different base types)
Date: Sat, 11 Dec 2021 07:19:40 +0800 [thread overview]
Message-ID: <202112110756.lMQBZRW5-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-5.17/drivers
head: db67097aa6f2587b44055f2e16db72a11e17faef
commit: 2385ebf38f94d4f7761b1e9a4973d04753da02c2 [77/78] block: null_blk: batched complete poll requests
config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20211211/202112110756.lMQBZRW5-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?id=2385ebf38f94d4f7761b1e9a4973d04753da02c2
git remote add axboe-block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block for-5.17/drivers
git checkout 2385ebf38f94d4f7761b1e9a4973d04753da02c2
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/block/null_blk/main.c:1577:55: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected int ioerror @@ got restricted blk_status_t [usertype] error @@
drivers/block/null_blk/main.c:1577:55: sparse: expected int ioerror
drivers/block/null_blk/main.c:1577:55: sparse: got restricted blk_status_t [usertype] error
vim +1577 drivers/block/null_blk/main.c
1557
1558 static int null_poll(struct blk_mq_hw_ctx *hctx, struct io_comp_batch *iob)
1559 {
1560 struct nullb_queue *nq = hctx->driver_data;
1561 LIST_HEAD(list);
1562 int nr = 0;
1563
1564 spin_lock(&nq->poll_lock);
1565 list_splice_init(&nq->poll_list, &list);
1566 spin_unlock(&nq->poll_lock);
1567
1568 while (!list_empty(&list)) {
1569 struct nullb_cmd *cmd;
1570 struct request *req;
1571
1572 req = list_first_entry(&list, struct request, queuelist);
1573 list_del_init(&req->queuelist);
1574 cmd = blk_mq_rq_to_pdu(req);
1575 cmd->error = null_process_cmd(cmd, req_op(req), blk_rq_pos(req),
1576 blk_rq_sectors(req));
> 1577 if (!blk_mq_add_to_batch(req, iob, cmd->error,
1578 blk_mq_end_request_batch))
1579 end_cmd(cmd);
1580 nr++;
1581 }
1582
1583 return nr;
1584 }
1585
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2021-12-10 23:20 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=202112110756.lMQBZRW5-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
/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®