linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mkp-scsi:for-next 81/99] include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type
@ 2021-08-01 12:56 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-08-01 12:56 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: kbuild-all, linux-kernel, Martin K. Petersen

[-- Attachment #1: Type: text/plain, Size: 13905 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
head:   1084514ca9aa5b3fcc485b378b92b632918237f4
commit: 78011042684dfbb50f7060f4623793f7a5c74a01 [81/99] scsi: bsg: Move bsg_scsi_ops to drivers/scsi/
config: arm-davinci_all_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/mkp/scsi.git/commit/?id=78011042684dfbb50f7060f4623793f7a5c74a01
        git remote add mkp-scsi https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
        git fetch --no-tags mkp-scsi for-next
        git checkout 78011042684dfbb50f7060f4623793f7a5c74a01
        # 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=arm SHELL=/bin/bash arch/arm/mm/ block/ drivers/scsi/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

Note: the mkp-scsi/for-next HEAD 1084514ca9aa5b3fcc485b378b92b632918237f4 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from arch/arm/mm/init.c:9:
>> include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type
     541 |  struct bsg_class_device bsg_dev;
         |                          ^~~~~~~
   arch/arm/mm/init.c:97:13: warning: no previous prototype for 'setup_dma_zone' [-Wmissing-prototypes]
      97 | void __init setup_dma_zone(const struct machine_desc *mdesc)
         |             ^~~~~~~~~~~~~~
--
   In file included from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from arch/arm/include/asm/tlb.h:29,
                    from arch/arm/mm/mmu.c:24:
>> include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type
     541 |  struct bsg_class_device bsg_dev;
         |                          ^~~~~~~
   arch/arm/mm/mmu.c:118:13: warning: no previous prototype for 'init_default_cache_policy' [-Wmissing-prototypes]
     118 | void __init init_default_cache_policy(unsigned long pmd)
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/arm/mm/mmu.c:1156:13: warning: no previous prototype for 'adjust_lowmem_bounds' [-Wmissing-prototypes]
    1156 | void __init adjust_lowmem_bounds(void)
         |             ^~~~~~~~~~~~~~~~~~~~
   arch/arm/mm/mmu.c:1715:13: warning: no previous prototype for 'paging_init' [-Wmissing-prototypes]
    1715 | void __init paging_init(const struct machine_desc *mdesc)
         |             ^~~~~~~~~~~
   arch/arm/mm/mmu.c:1748:13: warning: no previous prototype for 'early_mm_init' [-Wmissing-prototypes]
    1748 | void __init early_mm_init(const struct machine_desc *mdesc)
         |             ^~~~~~~~~~~~~
--
   In file included from block/bsg.c:8:
>> include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type
     541 |  struct bsg_class_device bsg_dev;
         |                          ^~~~~~~
   block/bsg.c: In function 'bsg_get_device':
>> block/bsg.c:218:42: error: invalid use of undefined type 'struct bsg_class_device'
     218 |  bd = __bsg_get_device(iminor(inode), bcd->queue);
         |                                          ^~
   block/bsg.c:220:33: error: invalid use of undefined type 'struct bsg_class_device'
     220 |   bd = bsg_add_device(inode, bcd->queue, file);
         |                                 ^~
   block/bsg.c: At top level:
>> block/bsg.c:334:6: error: redefinition of 'bsg_unregister_queue'
     334 | void bsg_unregister_queue(struct request_queue *q)
         |      ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/blkdev.h:21,
                    from block/bsg.c:8:
   include/linux/bsg.h:30:20: note: previous definition of 'bsg_unregister_queue' was here
      30 | static inline void bsg_unregister_queue(struct request_queue *q)
         |                    ^~~~~~~~~~~~~~~~~~~~
   block/bsg.c: In function 'bsg_unregister_queue':
   block/bsg.c:338:10: error: invalid use of undefined type 'struct bsg_class_device'
     338 |  if (!bcd->class_dev)
         |          ^~
   block/bsg.c:342:32: error: invalid use of undefined type 'struct bsg_class_device'
     342 |  idr_remove(&bsg_minor_idr, bcd->minor);
         |                                ^~
   block/bsg.c:345:23: error: invalid use of undefined type 'struct bsg_class_device'
     345 |  device_unregister(bcd->class_dev);
         |                       ^~
   block/bsg.c:346:5: error: invalid use of undefined type 'struct bsg_class_device'
     346 |  bcd->class_dev = NULL;
         |     ^~
   block/bsg.c: At top level:
   block/bsg.c:352:34: warning: 'struct bsg_ops' declared inside parameter list will not be visible outside of this definition or declaration
     352 |   const char *name, const struct bsg_ops *ops)
         |                                  ^~~~~~~
   block/bsg.c:351:5: warning: no previous prototype for 'bsg_register_queue' [-Wmissing-prototypes]
     351 | int bsg_register_queue(struct request_queue *q, struct device *parent,
         |     ^~~~~~~~~~~~~~~~~~
   block/bsg.c: In function 'bsg_register_queue':
>> block/bsg.c:366:23: error: invalid application of 'sizeof' to incomplete type 'struct bsg_class_device'
     366 |  memset(bcd, 0, sizeof(*bcd));
         |                       ^
   block/bsg.c:379:5: error: invalid use of undefined type 'struct bsg_class_device'
     379 |  bcd->minor = ret;
         |     ^~
   block/bsg.c:380:5: error: invalid use of undefined type 'struct bsg_class_device'
     380 |  bcd->queue = q;
         |     ^~
   block/bsg.c:381:5: error: invalid use of undefined type 'struct bsg_class_device'
     381 |  bcd->ops = ops;
         |     ^~
   In file included from include/linux/genhd.h:14,
                    from include/linux/blkdev.h:8,
                    from block/bsg.c:8:
   block/bsg.c:382:28: error: invalid use of undefined type 'struct bsg_class_device'
     382 |  dev = MKDEV(bsg_major, bcd->minor);
         |                            ^~
   include/linux/kdev_t.h:12:46: note: in definition of macro 'MKDEV'
      12 | #define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi))
         |                                              ^~
   block/bsg.c:388:5: error: invalid use of undefined type 'struct bsg_class_device'
     388 |  bcd->class_dev = class_dev;
         |     ^~
   block/bsg.c:391:41: error: invalid use of undefined type 'struct bsg_class_device'
     391 |   ret = sysfs_create_link(&q->kobj, &bcd->class_dev->kobj, "bsg");
         |                                         ^~
   block/bsg.c:402:32: error: invalid use of undefined type 'struct bsg_class_device'
     402 |  idr_remove(&bsg_minor_idr, bcd->minor);
         |                                ^~
--
   In file included from include/linux/blk-cgroup.h:23,
                    from include/linux/writeback.h:14,
                    from include/linux/memcontrol.h:22,
                    from include/linux/swap.h:9,
                    from block/bio.c:6:
>> include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type
     541 |  struct bsg_class_device bsg_dev;
         |                          ^~~~~~~
--
   In file included from include/scsi/scsi_cmnd.h:6,
                    from drivers/scsi/scsi_bsg.c:5:
>> include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type
     541 |  struct bsg_class_device bsg_dev;
         |                          ^~~~~~~
>> drivers/scsi/scsi_bsg.c:85:21: error: variable 'scsi_bsg_ops' has initializer but incomplete type
      85 | static const struct bsg_ops scsi_bsg_ops = {
         |                     ^~~~~~~
   drivers/scsi/scsi_bsg.c:86:3: error: 'const struct bsg_ops' has no member named 'check_proto'
      86 |  .check_proto  = scsi_bsg_check_proto,
         |   ^~~~~~~~~~~
   drivers/scsi/scsi_bsg.c:86:18: warning: excess elements in struct initializer
      86 |  .check_proto  = scsi_bsg_check_proto,
         |                  ^~~~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_bsg.c:86:18: note: (near initialization for 'scsi_bsg_ops')
   drivers/scsi/scsi_bsg.c:87:3: error: 'const struct bsg_ops' has no member named 'fill_hdr'
      87 |  .fill_hdr  = scsi_bsg_fill_hdr,
         |   ^~~~~~~~
   drivers/scsi/scsi_bsg.c:87:15: warning: excess elements in struct initializer
      87 |  .fill_hdr  = scsi_bsg_fill_hdr,
         |               ^~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_bsg.c:87:15: note: (near initialization for 'scsi_bsg_ops')
   drivers/scsi/scsi_bsg.c:88:3: error: 'const struct bsg_ops' has no member named 'complete_rq'
      88 |  .complete_rq  = scsi_bsg_complete_rq,
         |   ^~~~~~~~~~~
   drivers/scsi/scsi_bsg.c:88:18: warning: excess elements in struct initializer
      88 |  .complete_rq  = scsi_bsg_complete_rq,
         |                  ^~~~~~~~~~~~~~~~~~~~
   drivers/scsi/scsi_bsg.c:88:18: note: (near initialization for 'scsi_bsg_ops')
   drivers/scsi/scsi_bsg.c:89:3: error: 'const struct bsg_ops' has no member named 'free_rq'
      89 |  .free_rq  = scsi_bsg_free_rq,
         |   ^~~~~~~
   drivers/scsi/scsi_bsg.c:89:14: warning: excess elements in struct initializer
      89 |  .free_rq  = scsi_bsg_free_rq,
         |              ^~~~~~~~~~~~~~~~
   drivers/scsi/scsi_bsg.c:89:14: note: (near initialization for 'scsi_bsg_ops')
   drivers/scsi/scsi_bsg.c: In function 'scsi_bsg_register_queue':
   drivers/scsi/scsi_bsg.c:94:9: error: implicit declaration of function 'bsg_register_queue'; did you mean 'blk_register_queue'? [-Werror=implicit-function-declaration]
      94 |  return bsg_register_queue(q, parent, dev_name(parent), &scsi_bsg_ops);
         |         ^~~~~~~~~~~~~~~~~~
         |         blk_register_queue
   drivers/scsi/scsi_bsg.c: At top level:
>> drivers/scsi/scsi_bsg.c:85:29: error: storage size of 'scsi_bsg_ops' isn't known
      85 | static const struct bsg_ops scsi_bsg_ops = {
         |                             ^~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   In file included from drivers/scsi/scsi_sysfs.c:13:
>> include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type
     541 |  struct bsg_class_device bsg_dev;
         |                          ^~~~~~~
   drivers/scsi/scsi_sysfs.c:1038:10: fatal error: scsi_devinfo_tbl.c: No such file or directory
    1038 | #include "scsi_devinfo_tbl.c"
         |          ^~~~~~~~~~~~~~~~~~~~
   compilation terminated.


vim +/bsg_dev +541 include/linux/blkdev.h

6cc77e9cb08041 Christoph Hellwig 2017-12-21  508  
^1da177e4c3f41 Linus Torvalds    2005-04-16  509  	/*
^1da177e4c3f41 Linus Torvalds    2005-04-16  510  	 * sg stuff
^1da177e4c3f41 Linus Torvalds    2005-04-16  511  	 */
^1da177e4c3f41 Linus Torvalds    2005-04-16  512  	unsigned int		sg_timeout;
^1da177e4c3f41 Linus Torvalds    2005-04-16  513  	unsigned int		sg_reserved_size;
1946089a109251 Christoph Lameter 2005-06-23  514  	int			node;
85e0cbbb8a7953 Luis Chamberlain  2020-06-19  515  	struct mutex		debugfs_mutex;
6c5c934153513d Alexey Dobriyan   2006-09-29  516  #ifdef CONFIG_BLK_DEV_IO_TRACE
c780e86dd48ef6 Jan Kara          2020-02-06  517  	struct blk_trace __rcu	*blk_trace;
6c5c934153513d Alexey Dobriyan   2006-09-29  518  #endif
^1da177e4c3f41 Linus Torvalds    2005-04-16  519  	/*
4913efe456c987 Tejun Heo         2010-09-03  520  	 * for flush operations
^1da177e4c3f41 Linus Torvalds    2005-04-16  521  	 */
7c94e1c157a227 Ming Lei          2014-09-25  522  	struct blk_flush_queue	*fq;
483f4afc421435 Al Viro           2006-03-18  523  
6fca6a611c27f1 Christoph Hellwig 2014-05-28  524  	struct list_head	requeue_list;
6fca6a611c27f1 Christoph Hellwig 2014-05-28  525  	spinlock_t		requeue_lock;
2849450ad39d2e Mike Snitzer      2016-09-14  526  	struct delayed_work	requeue_work;
6fca6a611c27f1 Christoph Hellwig 2014-05-28  527  
483f4afc421435 Al Viro           2006-03-18  528  	struct mutex		sysfs_lock;
cecf5d87ff2035 Ming Lei          2019-08-27  529  	struct mutex		sysfs_dir_lock;
d351af01b93075 FUJITA Tomonori   2007-07-09  530  
2f8f1336a48bd5 Ming Lei          2019-04-30  531  	/*
2f8f1336a48bd5 Ming Lei          2019-04-30  532  	 * for reusing dead hctx instance in case of updating
2f8f1336a48bd5 Ming Lei          2019-04-30  533  	 * nr_hw_queues
2f8f1336a48bd5 Ming Lei          2019-04-30  534  	 */
2f8f1336a48bd5 Ming Lei          2019-04-30  535  	struct list_head	unused_hctx_list;
2f8f1336a48bd5 Ming Lei          2019-04-30  536  	spinlock_t		unused_hctx_lock;
2f8f1336a48bd5 Ming Lei          2019-04-30  537  
7996a8b5511a72 Bob Liu           2019-05-21  538  	int			mq_freeze_depth;
d732580b4eb315 Tejun Heo         2012-03-05  539  
78011042684dfb Christoph Hellwig 2021-07-24  540  #if IS_ENABLED(CONFIG_BLK_DEV_BSG_COMMON)
d351af01b93075 FUJITA Tomonori   2007-07-09 @541  	struct bsg_class_device bsg_dev;
d351af01b93075 FUJITA Tomonori   2007-07-09  542  #endif
e43473b7f223ec Vivek Goyal       2010-09-15  543  

:::::: The code at line 541 was first introduced by commit
:::::: d351af01b9307566135cb0f355ca65d0952c10b5 bsg: bind bsg to request_queue instead of gendisk

:::::: TO: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
:::::: CC: Jens Axboe <jens.axboe@oracle.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32531 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-01 12:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 12:56 [mkp-scsi:for-next 81/99] include/linux/blkdev.h:541:26: error: field 'bsg_dev' has incomplete type kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).