tree: git://git.infradead.org/users/hch/block.git bi_bdev head: 870c5257e68dfb7fec2875e1ac0056cfd636f38b commit: acd826baaf9920c69383f300d1eab6dd060da5a9 [10/15] block: simplify submit_bio_checks a bit config: parisc-randconfig-c004-20210120 (attached as .config) compiler: hppa-linux-gcc (GCC) 9.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 bi_bdev git checkout acd826baaf9920c69383f300d1eab6dd060da5a9 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): block/blk-core.c: In function 'bio_check_ro': >> block/blk-core.c:697:49: error: 'part' undeclared (first use in this function) 697 | if (op_is_write(bio_op(bio)) && bdev_read_only(part)) { | ^~~~ block/blk-core.c:697:49: note: each undeclared identifier is reported only once for each function it appears in vim +/part +697 block/blk-core.c c17bb4951752d3e0 block/ll_rw_blk.c Akinobu Mita 2006-12-08 694 acd826baaf9920c6 block/blk-core.c Christoph Hellwig 2021-01-20 695 static inline bool bio_check_ro(struct bio *bio) 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 696 { 9cbe50a9ebadbab8 block/blk-core.c Christoph Hellwig 2020-12-08 @697 if (op_is_write(bio_op(bio)) && bdev_read_only(part)) { 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 698 char b[BDEVNAME_SIZE]; 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 699 8b2ded1c94c06f84 block/blk-core.c Mikulas Patocka 2018-09-05 700 if (op_is_flush(bio->bi_opf) && !bio_sectors(bio)) 8b2ded1c94c06f84 block/blk-core.c Mikulas Patocka 2018-09-05 701 return false; 8b2ded1c94c06f84 block/blk-core.c Mikulas Patocka 2018-09-05 702 a32e236eb93e62a0 block/blk-core.c Linus Torvalds 2018-08-03 703 WARN_ONCE(1, c8178674608679c8 block/blk-core.c Christoph Hellwig 2020-07-01 704 "Trying to write to read-only block-device %s (partno %d)\n", acd826baaf9920c6 block/blk-core.c Christoph Hellwig 2021-01-20 705 bio_devname(bio, b), bio->bi_bdev->bd_partno); a32e236eb93e62a0 block/blk-core.c Linus Torvalds 2018-08-03 706 /* Older lvm-tools actually trigger this */ a32e236eb93e62a0 block/blk-core.c Linus Torvalds 2018-08-03 707 return false; 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 708 } 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 709 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 710 return false; 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 711 } 721c7fc701c71f69 block/blk-core.c Ilya Dryomov 2018-01-11 712 :::::: The code at line 697 was first introduced by commit :::::: 9cbe50a9ebadbab8676b697a4b66694067d17314 block: add a hard-readonly flag to struct gendisk :::::: TO: Christoph Hellwig :::::: CC: Christoph Hellwig --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org