All of lore.kernel.org
 help / color / mirror / Atom feed
* [hch-block:gendisk-lookup 14/19] drivers/block/floppy.c:5054:35: error: gendisk is a pointer; did you mean to use
@ 2020-08-25 12:14 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-08-25 12:14 UTC (permalink / raw)
  To: kbuild-all

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

tree:   git://git.infradead.org/users/hch/block.git gendisk-lookup
head:   226e9ea4d5b7454ea79565cf3ec37559a9bc34c9
commit: 2bfcf5007de9a228a1b219dc79a07d75dff3e9a3 [14/19] floppy: use a separate gendisk for each media format
config: sparc64-randconfig-r034-20200825 (attached as .config)
compiler: sparc64-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 checkout 2bfcf5007de9a228a1b219dc79a07d75dff3e9a3
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc64 

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 arch/sparc/include/asm/floppy.h:5,
                    from drivers/block/floppy.c:251:
   arch/sparc/include/asm/floppy_64.h:200:13: warning: no previous prototype for 'sparc_floppy_irq' [-Wmissing-prototypes]
     200 | irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie)
         |             ^~~~~~~~~~~~~~~~
   In file included from arch/sparc/include/asm/floppy.h:5,
                    from drivers/block/floppy.c:251:
   arch/sparc/include/asm/floppy_64.h:437:6: warning: no previous prototype for 'sun_pci_fd_dma_callback' [-Wmissing-prototypes]
     437 | void sun_pci_fd_dma_callback(struct ebus_dma_info *p, int event, void *cookie)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/block/floppy.c: In function 'floppy_module_exit':
>> drivers/block/floppy.c:5054:35: error: '*(struct gendisk **)&disks[drive]' is a pointer; did you mean to use '->'?
    5054 |     blk_cleanup_queue(disks[drive]->queue);
         |                                   ^~
         |                                   ->
   drivers/block/floppy.c:5066:18: error: '*(struct gendisk **)&disks[drive]' is a pointer; did you mean to use '->'?
    5066 |      disks[drive]->queue = NULL;
         |                  ^~
         |                  ->
>> drivers/block/floppy.c:5072:19: error: passing argument 1 of 'put_disk' from incompatible pointer type [-Werror=incompatible-pointer-types]
    5072 |     put_disk(disks[drive]);
         |              ~~~~~^~~~~~~
         |                   |
         |                   struct gendisk **
   In file included from include/linux/blkdev.h:8,
                    from include/linux/blk-mq.h:5,
                    from drivers/block/floppy.c:255:
   include/linux/genhd.h:345:38: note: expected 'struct gendisk *' but argument is of type 'struct gendisk **'
     345 | extern void put_disk(struct gendisk *disk);
         |                      ~~~~~~~~~~~~~~~~^~~~
   cc1: some warnings being treated as errors

git remote add hch-block git://git.infradead.org/users/hch/block.git
git fetch --no-tags hch-block gendisk-lookup
git checkout 2bfcf5007de9a228a1b219dc79a07d75dff3e9a3
vim +5054 drivers/block/floppy.c

^1da177e4c3f41 Linus Torvalds            2005-04-16  5032  
7afea3bcb1f87f Jon Schindler             2008-04-29  5033  static void __exit floppy_module_exit(void)
^1da177e4c3f41 Linus Torvalds            2005-04-16  5034  {
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5035  	int drive, i;
^1da177e4c3f41 Linus Torvalds            2005-04-16  5036  
^1da177e4c3f41 Linus Torvalds            2005-04-16  5037  	unregister_blkdev(FLOPPY_MAJOR, "fd");
5e50b9ef975219 Ondrej Zary               2009-06-10  5038  	platform_driver_unregister(&floppy_driver);
^1da177e4c3f41 Linus Torvalds            2005-04-16  5039  
eac7cc52c6b410 Jiri Kosina               2012-11-06  5040  	destroy_workqueue(floppy_wq);
eac7cc52c6b410 Jiri Kosina               2012-11-06  5041  
^1da177e4c3f41 Linus Torvalds            2005-04-16  5042  	for (drive = 0; drive < N_DRIVE; drive++) {
^1da177e4c3f41 Linus Torvalds            2005-04-16  5043  		del_timer_sync(&motor_off_timer[drive]);
^1da177e4c3f41 Linus Torvalds            2005-04-16  5044  
8d3ab4ebfd7435 Herton Ronaldo Krzesinski 2012-08-27  5045  		if (floppy_available(drive)) {
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5046  			for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5047  				if (disks[drive][i])
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5048  					del_gendisk(disks[drive][i]);
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5049  			}
94fd0db7bfb4a0 Hannes Reinecke           2005-07-15  5050  			platform_device_unregister(&floppy_device[drive]);
^1da177e4c3f41 Linus Torvalds            2005-04-16  5051  		}
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5052  		for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5053  			if (disks[drive][i])
488211844e0c3f Jens Axboe                2010-09-22 @5054  				blk_cleanup_queue(disks[drive]->queue);
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5055  		}
a9f38e1dec107a Omar Sandoval             2018-10-15  5056  		blk_mq_free_tag_set(&tag_sets[drive]);
4609dff6b5d11e Vivek Goyal               2012-02-08  5057  
4609dff6b5d11e Vivek Goyal               2012-02-08  5058  		/*
4609dff6b5d11e Vivek Goyal               2012-02-08  5059  		 * These disks have not called add_disk().  Don't put down
4609dff6b5d11e Vivek Goyal               2012-02-08  5060  		 * queue reference in put_disk().
4609dff6b5d11e Vivek Goyal               2012-02-08  5061  		 */
4609dff6b5d11e Vivek Goyal               2012-02-08  5062  		if (!(allowed_drive_mask & (1 << drive)) ||
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5063  		    fdc_state[FDC(drive)].version == FDC_NONE) {
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5064  			for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5065  				if (disks[drive][i])
4609dff6b5d11e Vivek Goyal               2012-02-08  5066  					disks[drive]->queue = NULL;
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5067  			}
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5068  		}
4609dff6b5d11e Vivek Goyal               2012-02-08  5069  
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5070  		for (i = 0; i < ARRAY_SIZE(floppy_type); i++) {
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5071  			if (disks[drive][i])
d017bf6b4ff57d Vivek Goyal               2010-11-06 @5072  				put_disk(disks[drive]);
^1da177e4c3f41 Linus Torvalds            2005-04-16  5073  		}
2bfcf5007de9a2 Christoph Hellwig         2020-08-25  5074  	}
^1da177e4c3f41 Linus Torvalds            2005-04-16  5075  
070ad7e793dc6f Jiri Kosina               2012-05-18  5076  	cancel_delayed_work_sync(&fd_timeout);
070ad7e793dc6f Jiri Kosina               2012-05-18  5077  	cancel_delayed_work_sync(&fd_timer);
^1da177e4c3f41 Linus Torvalds            2005-04-16  5078  
575cfc673e0f2e Stephen Hemminger         2010-06-15  5079  	if (atomic_read(&usage_count))
^1da177e4c3f41 Linus Torvalds            2005-04-16  5080  		floppy_release_irq_and_dma();
^1da177e4c3f41 Linus Torvalds            2005-04-16  5081  
^1da177e4c3f41 Linus Torvalds            2005-04-16  5082  	/* eject disk, if any */
^1da177e4c3f41 Linus Torvalds            2005-04-16  5083  	fd_eject(0);
^1da177e4c3f41 Linus Torvalds            2005-04-16  5084  }
48c8cee61f22fe Joe Perches               2010-03-10  5085  

:::::: The code@line 5054 was first introduced by commit
:::::: 488211844e0c3fad6ffa98a6f3c4f2139074e79a floppy: switch to one queue per drive instead of sharing a queue

:::::: TO: Jens Axboe <jaxboe@fusionio.com>
:::::: CC: Jens Axboe <jaxboe@fusionio.com>

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

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

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

only message in thread, other threads:[~2020-08-25 12:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 12:14 [hch-block:gendisk-lookup 14/19] drivers/block/floppy.c:5054:35: error: gendisk is a pointer; did you mean to use kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.