Messages in this thread | | | Date | Sun, 25 Jul 2021 21:20:39 +0800 | From | kernel test robot <> | Subject | [hch-block:blkdev.h-includes 14/16] include/linux/blk_types.h:434:8: error: invalid use of undefined type 'struct request' |
| |
tree: git://git.infradead.org/users/hch/block.git blkdev.h-includes head: db08f634bead64da6de80830782f3c339fc41b11 commit: be3ba4f465ffc4c2ae10a1556ae6b80bcce17235 [14/16] block: move struct request to blk-mq.h config: h8300-randconfig-r001-20210725 (attached as .config) compiler: h8300-linux-gcc (GCC) 10.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 git remote add hch-block git://git.infradead.org/users/hch/block.git git fetch --no-tags hch-block blkdev.h-includes git checkout be3ba4f465ffc4c2ae10a1556ae6b80bcce17235 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/block/
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/genhd.h:19, from include/linux/blkdev.h:7, from drivers/block/rnbd/rnbd-proto.h:13, from drivers/block/rnbd/rnbd-common.c:9: drivers/block/rnbd/rnbd-proto.h: In function 'rq_to_rnbd_flags': >> include/linux/blk_types.h:434:8: error: invalid use of undefined type 'struct request' 434 | ((req)->cmd_flags & REQ_OP_MASK) | ^~ drivers/block/rnbd/rnbd-proto.h:274:10: note: in expansion of macro 'req_op' 274 | switch (req_op(rq)) { | ^~~~~~ In file included from arch/h8300/include/asm/bug.h:8, from include/linux/bug.h:5, from include/linux/thread_info.h:13, from include/asm-generic/current.h:5, from ./arch/h8300/include/generated/asm/current.h:1, from include/linux/sched.h:12, from include/linux/blkdev.h:5, from drivers/block/rnbd/rnbd-proto.h:13, from drivers/block/rnbd/rnbd-common.c:9: >> include/linux/blk_types.h:434:8: error: invalid use of undefined type 'struct request' 434 | ((req)->cmd_flags & REQ_OP_MASK) | ^~ include/asm-generic/bug.h:91:48: note: in definition of macro '__WARN_printf' 91 | warn_slowpath_fmt(__FILE__, __LINE__, taint, arg); \ | ^~~ drivers/block/rnbd/rnbd-proto.h:294:3: note: in expansion of macro 'WARN' 294 | WARN(1, "Unknown request type %d (flags %llu)\n", | ^~~~ drivers/block/rnbd/rnbd-proto.h:295:8: note: in expansion of macro 'req_op' 295 | req_op(rq), (unsigned long long)rq->cmd_flags); | ^~~~~~ >> drivers/block/rnbd/rnbd-proto.h:295:42: error: invalid use of undefined type 'struct request' 295 | req_op(rq), (unsigned long long)rq->cmd_flags); | ^~ include/asm-generic/bug.h:91:48: note: in definition of macro '__WARN_printf' 91 | warn_slowpath_fmt(__FILE__, __LINE__, taint, arg); \ | ^~~ drivers/block/rnbd/rnbd-proto.h:294:3: note: in expansion of macro 'WARN' 294 | WARN(1, "Unknown request type %d (flags %llu)\n", | ^~~~ In file included from drivers/block/rnbd/rnbd-common.c:9: drivers/block/rnbd/rnbd-proto.h:299:19: error: invalid use of undefined type 'struct request' 299 | if (op_is_sync(rq->cmd_flags)) | ^~ drivers/block/rnbd/rnbd-proto.h:302:20: error: invalid use of undefined type 'struct request' 302 | if (op_is_flush(rq->cmd_flags)) | ^~
vim +434 include/linux/blk_types.h
dbae2c551377b6 Michael Callahan 2018-07-18 430 ef295ecf090d3e Christoph Hellwig 2016-10-28 431 #define bio_op(bio) \ ef295ecf090d3e Christoph Hellwig 2016-10-28 432 ((bio)->bi_opf & REQ_OP_MASK) ef295ecf090d3e Christoph Hellwig 2016-10-28 433 #define req_op(req) \ ef295ecf090d3e Christoph Hellwig 2016-10-28 @434 ((req)->cmd_flags & REQ_OP_MASK) 7cc015811ef899 Tejun Heo 2010-08-03 435
:::::: The code at line 434 was first introduced by commit :::::: ef295ecf090d3e86e5b742fc6ab34f1122a43773 block: better op and flags encoding
:::::: TO: Christoph Hellwig <hch@lst.de> :::::: CC: Jens Axboe <axboe@fb.com>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |