Messages in this thread | | | Date | Sat, 11 Dec 2021 07:19:40 +0800 | From | kernel test robot <> | 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) |
| |
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
| |