tree:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git perf-wip
head: 817022be1c1afcf3b0ca057ef25a8298c7a0a959
commit: 33801f83c8ad07e0c4fdf56362081b29882d5bf7 [30/33] block: change plugging to use a
singly linked list
config: arm-buildonly-randconfig-r002-20211015 (attached as .config)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
6069a6a5049497a32a50a49661c2f4169078bdba)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
#
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/com...
git remote add axboe-block
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags axboe-block perf-wip
git checkout 33801f83c8ad07e0c4fdf56362081b29882d5bf7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> block/blk-mq.c:2168:6: error: no previous prototype for function
'blk_mq_plug_issue_direct' [-Werror,-Wmissing-prototypes]
void
blk_mq_plug_issue_direct(struct blk_plug *plug, bool from_schedule)
^
block/blk-mq.c:2168:1: note: declare 'static' if the function is not intended
to be used outside of this translation unit
void blk_mq_plug_issue_direct(struct blk_plug *plug, bool from_schedule)
^
static
> block/blk-mq.c:2591:14: error: variable 'first_rq' is
used uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
} else if (same_queue_rq) {
^~~~~~~~~~~~~
block/blk-mq.c:2598:7: note: uninitialized use occurs here
if (first_rq) {
^~~~~~~~
block/blk-mq.c:2591:10: note: remove the 'if' if its condition is always true
} else if (same_queue_rq) {
^~~~~~~~~~~~~~~~~~~
block/blk-mq.c:2580:27: note: initialize the variable 'first_rq' to silence
this warning
struct request *first_rq;
^
= NULL
2 errors generated.
vim +/blk_mq_plug_issue_direct +2168 block/blk-mq.c
2167
2168 void blk_mq_plug_issue_direct(struct blk_plug *plug, bool
from_schedule)
2169 {
2170 struct blk_mq_hw_ctx *hctx = NULL;
2171 int queued = 0;
2172 int errors = 0;
2173
2174 while (!rq_list_empty(plug->mq_list)) {
2175 struct request *rq;
2176 blk_status_t ret;
2177
2178 rq = rq_list_pop(&plug->mq_list);
2179
2180 if (!hctx)
2181 hctx = rq->mq_hctx;
2182 else if (hctx != rq->mq_hctx &&
hctx->queue->mq_ops->commit_rqs) {
2183 trace_block_unplug(hctx->queue, queued, !from_schedule);
2184 hctx->queue->mq_ops->commit_rqs(hctx);
2185 queued = 0;
2186 hctx = rq->mq_hctx;
2187 }
2188
2189 ret = blk_mq_request_issue_directly(rq,
2190 rq_list_empty(plug->mq_list));
2191 if (ret != BLK_STS_OK) {
2192 if (ret == BLK_STS_RESOURCE ||
2193 ret == BLK_STS_DEV_RESOURCE) {
2194 blk_mq_request_bypass_insert(rq, false,
2195 rq_list_empty(plug->mq_list));
2196 break;
2197 }
2198 blk_mq_end_request(rq, ret);
2199 errors++;
2200 } else
2201 queued++;
2202 }
2203
2204 /*
2205 * If we didn't flush the entire list, we could have told
2206 * the driver there was more coming, but that turned out to
2207 * be a lie.
2208 */
2209 if ((!rq_list_empty(plug->mq_list) || errors) &&
2210 hctx->queue->mq_ops->commit_rqs && queued)
2211 hctx->queue->mq_ops->commit_rqs(hctx);
2212 }
2213
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org