All of lore.kernel.org
 help / color / mirror / Atom feed
* [hch-block:blkdev.h-includes 14/17] drivers/block/floppy.c:4500:16: error: use of undeclared identifier 'FLOPPY_MAJOR'; did you mean 'FLOPPY_DMA'?
@ 2021-09-06 20:21 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-06 20:21 UTC (permalink / raw)
  To: kbuild-all

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

tree:   git://git.infradead.org/users/hch/block.git blkdev.h-includes
head:   9a8385d2d0ea7e589b98c102f4a60576385ca6c7
commit: 390df5b131b24e07917f79ae8f87437ea668cb61 [14/17] block: drop unused includes in <linux/genhd.h>
config: i386-randconfig-a016-20210906 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739)
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 390df5b131b24e07917f79ae8f87437ea668cb61
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=i386 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 >>):

>> drivers/block/floppy.c:4500:16: error: use of undeclared identifier 'FLOPPY_MAJOR'; did you mean 'FLOPPY_DMA'?
           disk->major = FLOPPY_MAJOR;
                         ^~~~~~~~~~~~
                         FLOPPY_DMA
   drivers/block/floppy.c:207:12: note: 'FLOPPY_DMA' declared here
   static int FLOPPY_DMA = 2;
              ^
   drivers/block/floppy.c:4573:26: error: use of undeclared identifier 'FLOPPY_MAJOR'; did you mean 'FLOPPY_DMA'?
           err = __register_blkdev(FLOPPY_MAJOR, "fd", floppy_probe);
                                   ^~~~~~~~~~~~
                                   FLOPPY_DMA
   drivers/block/floppy.c:207:12: note: 'FLOPPY_DMA' declared here
   static int FLOPPY_DMA = 2;
              ^
   drivers/block/floppy.c:4715:20: error: use of undeclared identifier 'FLOPPY_MAJOR'; did you mean 'FLOPPY_DMA'?
           unregister_blkdev(FLOPPY_MAJOR, "fd");
                             ^~~~~~~~~~~~
                             FLOPPY_DMA
   drivers/block/floppy.c:207:12: note: 'FLOPPY_DMA' declared here
   static int FLOPPY_DMA = 2;
              ^
   drivers/block/floppy.c:4936:20: error: use of undeclared identifier 'FLOPPY_MAJOR'; did you mean 'FLOPPY_DMA'?
           unregister_blkdev(FLOPPY_MAJOR, "fd");
                             ^~~~~~~~~~~~
                             FLOPPY_DMA
   drivers/block/floppy.c:207:12: note: 'FLOPPY_DMA' declared here
   static int FLOPPY_DMA = 2;
              ^
   4 errors generated.


vim +4500 drivers/block/floppy.c

8d3ab4ebfd7435 Herton Ronaldo Krzesinski 2012-08-27  4490  
302cfee150291c Christoph Hellwig         2020-10-29  4491  static int floppy_alloc_disk(unsigned int drive, unsigned int type)
^1da177e4c3f41 Linus Torvalds            2005-04-16  4492  {
302cfee150291c Christoph Hellwig         2020-10-29  4493  	struct gendisk *disk;
302cfee150291c Christoph Hellwig         2020-10-29  4494  
34f84aefe2ba0a Christoph Hellwig         2021-06-02  4495  	disk = blk_mq_alloc_disk(&tag_sets[drive], NULL);
34f84aefe2ba0a Christoph Hellwig         2021-06-02  4496  	if (IS_ERR(disk))
34f84aefe2ba0a Christoph Hellwig         2021-06-02  4497  		return PTR_ERR(disk);
302cfee150291c Christoph Hellwig         2020-10-29  4498  
302cfee150291c Christoph Hellwig         2020-10-29  4499  	blk_queue_max_hw_sectors(disk->queue, 64);
302cfee150291c Christoph Hellwig         2020-10-29 @4500  	disk->major = FLOPPY_MAJOR;
302cfee150291c Christoph Hellwig         2020-10-29  4501  	disk->first_minor = TOMINOR(drive) | (type << 2);
34f84aefe2ba0a Christoph Hellwig         2021-06-02  4502  	disk->minors = 1;
302cfee150291c Christoph Hellwig         2020-10-29  4503  	disk->fops = &floppy_fops;
302cfee150291c Christoph Hellwig         2020-10-29  4504  	disk->events = DISK_EVENT_MEDIA_CHANGE;
302cfee150291c Christoph Hellwig         2020-10-29  4505  	if (type)
302cfee150291c Christoph Hellwig         2020-10-29  4506  		sprintf(disk->disk_name, "fd%d_type%d", drive, type);
302cfee150291c Christoph Hellwig         2020-10-29  4507  	else
302cfee150291c Christoph Hellwig         2020-10-29  4508  		sprintf(disk->disk_name, "fd%d", drive);
302cfee150291c Christoph Hellwig         2020-10-29  4509  	/* to be cleaned up... */
302cfee150291c Christoph Hellwig         2020-10-29  4510  	disk->private_data = (void *)(long)drive;
302cfee150291c Christoph Hellwig         2020-10-29  4511  	disk->flags |= GENHD_FL_REMOVABLE;
302cfee150291c Christoph Hellwig         2020-10-29  4512  
302cfee150291c Christoph Hellwig         2020-10-29  4513  	disks[drive][type] = disk;
302cfee150291c Christoph Hellwig         2020-10-29  4514  	return 0;
302cfee150291c Christoph Hellwig         2020-10-29  4515  }
302cfee150291c Christoph Hellwig         2020-10-29  4516  

:::::: The code at line 4500 was first introduced by commit
:::::: 302cfee150291c6cd85b1ca197d062d0b423d09c floppy: use a separate gendisk for each media format

:::::: 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(a)lists.01.org

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

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

only message in thread, other threads:[~2021-09-06 20:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 20:21 [hch-block:blkdev.h-includes 14/17] drivers/block/floppy.c:4500:16: error: use of undeclared identifier 'FLOPPY_MAJOR'; did you mean 'FLOPPY_DMA'? 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.