Messages in this thread | | | Date | Sun, 25 Jul 2021 18:05:22 +0800 | From | kernel test robot <> | Subject | [mcgrof-next:20210708-block-fixes-v2 61/89] drivers/md/md.c:9592:42: error: passing argument 3 of '__register_blkdev' from incompatible pointer type |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20210708-block-fixes-v2 head: db0174e39de7dc941f158ce53ee3af95b1635b62 commit: b253de076cda99b4968dd20b1a9702de24376152 [61/89] block: make __register_blkdev() return an error config: arc-allyesconfig (attached as .config) compiler: arceb-elf-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 # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=b253de076cda99b4968dd20b1a9702de24376152 git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git git fetch --no-tags mcgrof-next 20210708-block-fixes-v2 git checkout b253de076cda99b4968dd20b1a9702de24376152 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arc
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 >>):
drivers/md/md.c: In function 'md_init': >> drivers/md/md.c:9592:42: error: passing argument 3 of '__register_blkdev' from incompatible pointer type [-Werror=incompatible-pointer-types] 9592 | ret = __register_blkdev(MD_MAJOR, "md", md_probe); | ^~~~~~~~ | | | void (*)(dev_t) {aka void (*)(unsigned int)} In file included from include/linux/blkdev.h:8, from drivers/md/md.c:43: include/linux/genhd.h:315:9: note: expected 'int (*)(dev_t)' {aka 'int (*)(unsigned int)'} but argument is of type 'void (*)(dev_t)' {aka 'void (*)(unsigned int)'} 315 | int (*probe)(dev_t devt)); | ~~~~~~^~~~~~~~~~~~~~~~~~ drivers/md/md.c:9596:36: error: passing argument 3 of '__register_blkdev' from incompatible pointer type [-Werror=incompatible-pointer-types] 9596 | ret = __register_blkdev(0, "mdp", md_probe); | ^~~~~~~~ | | | void (*)(dev_t) {aka void (*)(unsigned int)} In file included from include/linux/blkdev.h:8, from drivers/md/md.c:43: include/linux/genhd.h:315:9: note: expected 'int (*)(dev_t)' {aka 'int (*)(unsigned int)'} but argument is of type 'void (*)(dev_t)' {aka 'void (*)(unsigned int)'} 315 | int (*probe)(dev_t devt)); | ~~~~~~^~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors
vim +/__register_blkdev +9592 drivers/md/md.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 9575 75c96f85845a67 Adrian Bunk 2005-05-05 9576 static int __init md_init(void) ^1da177e4c3f41 Linus Torvalds 2005-04-16 9577 { e804ac780e2f01 Tejun Heo 2010-10-15 9578 int ret = -ENOMEM; e804ac780e2f01 Tejun Heo 2010-10-15 9579 ada609ee2ac2e0 Tejun Heo 2011-01-25 9580 md_wq = alloc_workqueue("md", WQ_MEM_RECLAIM, 0); e804ac780e2f01 Tejun Heo 2010-10-15 9581 if (!md_wq) e804ac780e2f01 Tejun Heo 2010-10-15 9582 goto err_wq; e804ac780e2f01 Tejun Heo 2010-10-15 9583 e804ac780e2f01 Tejun Heo 2010-10-15 9584 md_misc_wq = alloc_workqueue("md_misc", 0, 0); e804ac780e2f01 Tejun Heo 2010-10-15 9585 if (!md_misc_wq) e804ac780e2f01 Tejun Heo 2010-10-15 9586 goto err_misc_wq; e804ac780e2f01 Tejun Heo 2010-10-15 9587 cc1ffe61c026e2 Guoqing Jiang 2020-04-04 9588 md_rdev_misc_wq = alloc_workqueue("md_rdev_misc", 0, 0); cf0b9b4821a295 Guoqing Jiang 2020-10-08 9589 if (!md_rdev_misc_wq) cc1ffe61c026e2 Guoqing Jiang 2020-04-04 9590 goto err_rdev_misc_wq; cc1ffe61c026e2 Guoqing Jiang 2020-04-04 9591 28144f9998e047 Christoph Hellwig 2020-10-29 @9592 ret = __register_blkdev(MD_MAJOR, "md", md_probe); 28144f9998e047 Christoph Hellwig 2020-10-29 9593 if (ret < 0) e804ac780e2f01 Tejun Heo 2010-10-15 9594 goto err_md; e804ac780e2f01 Tejun Heo 2010-10-15 9595 28144f9998e047 Christoph Hellwig 2020-10-29 9596 ret = __register_blkdev(0, "mdp", md_probe); 28144f9998e047 Christoph Hellwig 2020-10-29 9597 if (ret < 0) e804ac780e2f01 Tejun Heo 2010-10-15 9598 goto err_mdp; e804ac780e2f01 Tejun Heo 2010-10-15 9599 mdp_major = ret; e804ac780e2f01 Tejun Heo 2010-10-15 9600 ^1da177e4c3f41 Linus Torvalds 2005-04-16 9601 register_reboot_notifier(&md_notifier); 0b4d414714f0d2 Eric W. Biederman 2007-02-14 9602 raid_table_header = register_sysctl_table(raid_root_table); ^1da177e4c3f41 Linus Torvalds 2005-04-16 9603 ^1da177e4c3f41 Linus Torvalds 2005-04-16 9604 md_geninit(); d710e138126000 NeilBrown 2008-10-13 9605 return 0; ^1da177e4c3f41 Linus Torvalds 2005-04-16 9606 e804ac780e2f01 Tejun Heo 2010-10-15 9607 err_mdp: e804ac780e2f01 Tejun Heo 2010-10-15 9608 unregister_blkdev(MD_MAJOR, "md"); e804ac780e2f01 Tejun Heo 2010-10-15 9609 err_md: cc1ffe61c026e2 Guoqing Jiang 2020-04-04 9610 destroy_workqueue(md_rdev_misc_wq); cc1ffe61c026e2 Guoqing Jiang 2020-04-04 9611 err_rdev_misc_wq: e804ac780e2f01 Tejun Heo 2010-10-15 9612 destroy_workqueue(md_misc_wq); e804ac780e2f01 Tejun Heo 2010-10-15 9613 err_misc_wq: e804ac780e2f01 Tejun Heo 2010-10-15 9614 destroy_workqueue(md_wq); e804ac780e2f01 Tejun Heo 2010-10-15 9615 err_wq: e804ac780e2f01 Tejun Heo 2010-10-15 9616 return ret; e804ac780e2f01 Tejun Heo 2010-10-15 9617 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 9618
:::::: The code at line 9592 was first introduced by commit :::::: 28144f9998e047a9bac31421914335c6bc6eaa67 md: use __register_blkdev to allocate devices on demand
:::::: TO: Christoph Hellwig <hch@lst.de> :::::: CC: Jens Axboe <axboe@kernel.dk>
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |