lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202512302108.nIV8r5ES-lkp@intel.com>
Date: Tue, 30 Dec 2025 21:34:11 +0100
From: kernel test robot <lkp@...el.com>
To: Yuto Ohnuki <ytohnuki@...zon.com>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, Yuto Ohnuki <ytohnuki@...zon.com>
Subject: Re: [PATCH] fs: remove stale and duplicate forward declarations

Hi Yuto,

kernel test robot noticed the following build errors:

[auto build test ERROR on brauner-vfs/vfs.all]
[also build test ERROR on linus/master v6.16-rc1 next-20251219]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Yuto-Ohnuki/fs-remove-stale-and-duplicate-forward-declarations/20251229-151612
base:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link:    https://lore.kernel.org/r/20251229071401.98146-1-ytohnuki%40amazon.com
patch subject: [PATCH] fs: remove stale and duplicate forward declarations
config: x86_64-rhel-9.4-ltp (https://download.01.org/0day-ci/archive/20251230/202512302108.nIV8r5ES-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251230/202512302108.nIV8r5ES-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512302108.nIV8r5ES-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from block/bdev.c:14:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
--
   In file included from block/ioctl.c:4:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
   block/ioctl.c: In function 'blkdev_getgeo':
>> block/ioctl.c:564:40: error: passing argument 2 of 'disk->fops->getgeo' from incompatible pointer type [-Wincompatible-pointer-types]
     564 |         ret = disk->fops->getgeo(disk, &geo);
         |                                        ^~~~
         |                                        |
         |                                        struct hd_geometry *
   block/ioctl.c:564:40: note: expected 'struct hd_geometry *' but argument is of type 'struct hd_geometry *'
--
   In file included from drivers/md/md.c:43:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
>> drivers/md/md.c:8421:27: error: initialization of 'int (*)(struct gendisk *, struct hd_geometry *)' from incompatible pointer type 'int (*)(struct gendisk *, struct hd_geometry *)' [-Wincompatible-pointer-types]
    8421 |         .getgeo         = md_getgeo,
         |                           ^~~~~~~~~
   drivers/md/md.c:8421:27: note: (near initialization for 'md_fops.getgeo')
--
   In file included from include/linux/blk-mq.h:5,
                    from drivers/md/dm-core.h:15,
                    from drivers/md/dm-builtin.c:2:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
   In file included from drivers/md/dm.h:14,
                    from drivers/md/dm-core.h:21:
>> include/linux/device-mapper.h:571:54: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     571 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                                      ^~~~~~~~~~~
   include/linux/device-mapper.h:572:54: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     572 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                                      ^~~~~~~~~~~
--
   In file included from include/linux/blk-mq.h:5,
                    from drivers/md/dm-core.h:15,
                    from drivers/md/dm.c:9:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
   In file included from drivers/md/dm.h:14,
                    from drivers/md/dm-core.h:21:
>> include/linux/device-mapper.h:571:54: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     571 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                                      ^~~~~~~~~~~
   include/linux/device-mapper.h:572:54: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     572 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                                      ^~~~~~~~~~~
   drivers/md/dm.c: In function 'dm_blk_getgeo':
>> drivers/md/dm.c:410:36: error: passing argument 2 of 'dm_get_geometry' from incompatible pointer type [-Wincompatible-pointer-types]
     410 |         return dm_get_geometry(md, geo);
         |                                    ^~~
         |                                    |
         |                                    struct hd_geometry *
   include/linux/device-mapper.h:571:67: note: expected 'struct hd_geometry *' but argument is of type 'struct hd_geometry *'
     571 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                               ~~~~~~~~~~~~~~~~~~~~^~~
   drivers/md/dm.c: At top level:
>> drivers/md/dm.c:839:5: error: conflicting types for 'dm_get_geometry'; have 'int(struct mapped_device *, struct hd_geometry *)'
     839 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo)
         |     ^~~~~~~~~~~~~~~
   include/linux/device-mapper.h:571:5: note: previous declaration of 'dm_get_geometry' with type 'int(struct mapped_device *, struct hd_geometry *)'
     571 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |     ^~~~~~~~~~~~~~~
>> drivers/md/dm.c:849:5: error: conflicting types for 'dm_set_geometry'; have 'int(struct mapped_device *, struct hd_geometry *)'
     849 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo)
         |     ^~~~~~~~~~~~~~~
   include/linux/device-mapper.h:572:5: note: previous declaration of 'dm_set_geometry' with type 'int(struct mapped_device *, struct hd_geometry *)'
     572 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |     ^~~~~~~~~~~~~~~
>> drivers/md/dm.c:3784:19: error: initialization of 'int (*)(struct gendisk *, struct hd_geometry *)' from incompatible pointer type 'int (*)(struct gendisk *, struct hd_geometry *)' [-Wincompatible-pointer-types]
    3784 |         .getgeo = dm_blk_getgeo,
         |                   ^~~~~~~~~~~~~
   drivers/md/dm.c:3784:19: note: (near initialization for 'dm_blk_dops.getgeo')
   drivers/md/dm.c:3795:19: error: initialization of 'int (*)(struct gendisk *, struct hd_geometry *)' from incompatible pointer type 'int (*)(struct gendisk *, struct hd_geometry *)' [-Wincompatible-pointer-types]
    3795 |         .getgeo = dm_blk_getgeo,
         |                   ^~~~~~~~~~~~~
   drivers/md/dm.c:3795:19: note: (near initialization for 'dm_rq_blk_dops.getgeo')
--
   In file included from include/linux/blk-mq.h:5,
                    from drivers/md/dm-core.h:15,
                    from drivers/md/dm-ioctl.c:9:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
   In file included from drivers/md/dm.h:14,
                    from drivers/md/dm-core.h:21:
>> include/linux/device-mapper.h:571:54: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     571 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                                      ^~~~~~~~~~~
   include/linux/device-mapper.h:572:54: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     572 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                                      ^~~~~~~~~~~
   drivers/md/dm-ioctl.c: In function 'dev_set_geometry':
>> drivers/md/dm-ioctl.c:1111:33: error: passing argument 2 of 'dm_set_geometry' from incompatible pointer type [-Wincompatible-pointer-types]
    1111 |         r = dm_set_geometry(md, &geometry);
         |                                 ^~~~~~~~~
         |                                 |
         |                                 struct hd_geometry *
   include/linux/device-mapper.h:572:67: note: expected 'struct hd_geometry *' but argument is of type 'struct hd_geometry *'
     572 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
         |                                               ~~~~~~~~~~~~~~~~~~~~^~~
--
   In file included from drivers/nvdimm/btt.c:8:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
>> drivers/nvdimm/btt.c:1493:33: error: initialization of 'int (*)(struct gendisk *, struct hd_geometry *)' from incompatible pointer type 'int (*)(struct gendisk *, struct hd_geometry *)' [-Wincompatible-pointer-types]
    1493 |         .getgeo =               btt_getgeo,
         |                                 ^~~~~~~~~~
   drivers/nvdimm/btt.c:1493:33: note: (near initialization for 'btt_fops.getgeo')
--
   In file included from include/linux/blk-mq.h:5,
                    from drivers/memstick/core/mspro_block.c:11:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
>> drivers/memstick/core/mspro_block.c:206:27: error: initialization of 'int (*)(struct gendisk *, struct hd_geometry *)' from incompatible pointer type 'int (*)(struct gendisk *, struct hd_geometry *)' [-Wincompatible-pointer-types]
     206 |         .getgeo         = mspro_block_bd_getgeo,
         |                           ^~~~~~~~~~~~~~~~~~~~~
   drivers/memstick/core/mspro_block.c:206:27: note: (near initialization for 'ms_block_bdops.getgeo')
--
   In file included from drivers/nvme/host/core.c:8:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
>> drivers/nvme/host/core.c:2616:27: error: initialization of 'int (*)(struct gendisk *, struct hd_geometry *)' from incompatible pointer type 'int (*)(struct gendisk *, struct hd_geometry *)' [-Wincompatible-pointer-types]
    2616 |         .getgeo         = nvme_getgeo,
         |                           ^~~~~~~~~~~
   drivers/nvme/host/core.c:2616:27: note: (near initialization for 'nvme_bdev_ops.getgeo')
--
   In file included from include/linux/blk-mq.h:5,
                    from include/linux/blk-integrity.h:5,
                    from drivers/nvme/host/ioctl.c:6:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
   In file included from drivers/nvme/host/ioctl.c:10:
>> drivers/nvme/host/nvme.h:946:46: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     946 | int nvme_getgeo(struct gendisk *disk, struct hd_geometry *geo);
         |                                              ^~~~~~~~~~~
--
   In file included from include/linux/blk-mq.h:5,
                    from include/linux/blktrace_api.h:5,
                    from include/trace/events/block.h:8,
                    from drivers/nvme/host/multipath.c:9:
>> include/linux/blkdev.h:1656:48: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
    1656 |         int (*getgeo)(struct gendisk *, struct hd_geometry *);
         |                                                ^~~~~~~~~~~
   In file included from drivers/nvme/host/multipath.c:10:
>> drivers/nvme/host/nvme.h:946:46: warning: 'struct hd_geometry' declared inside parameter list will not be visible outside of this definition or declaration
     946 | int nvme_getgeo(struct gendisk *disk, struct hd_geometry *geo);
         |                                              ^~~~~~~~~~~
>> drivers/nvme/host/multipath.c:603:27: error: initialization of 'int (*)(struct gendisk *, struct hd_geometry *)' from incompatible pointer type 'int (*)(struct gendisk *, struct hd_geometry *)' [-Wincompatible-pointer-types]
     603 |         .getgeo         = nvme_getgeo,
         |                           ^~~~~~~~~~~
   drivers/nvme/host/multipath.c:603:27: note: (near initialization for 'nvme_ns_head_ops.getgeo')
..


vim +8421 drivers/md/md.c

e8c59ac4197443 Christoph Hellwig 2022-07-19  8410  
7e0adbfc20c50b Christoph Hellwig 2020-06-07  8411  const struct block_device_operations md_fops =
^1da177e4c3f41 Linus Torvalds    2005-04-16  8412  {
^1da177e4c3f41 Linus Torvalds    2005-04-16  8413  	.owner		= THIS_MODULE,
c62b37d96b6eb3 Christoph Hellwig 2020-07-01  8414  	.submit_bio	= md_submit_bio,
a39907fa2fdb73 Al Viro           2008-03-02  8415  	.open		= md_open,
a39907fa2fdb73 Al Viro           2008-03-02  8416  	.release	= md_release,
b492b852cd8c99 NeilBrown         2009-05-26  8417  	.ioctl		= md_ioctl,
aa98aa31987ad9 Arnd Bergmann     2009-12-14  8418  #ifdef CONFIG_COMPAT
aa98aa31987ad9 Arnd Bergmann     2009-12-14  8419  	.compat_ioctl	= md_compat_ioctl,
aa98aa31987ad9 Arnd Bergmann     2009-12-14  8420  #endif
a885c8c4316e1c Christoph Hellwig 2006-01-08 @8421  	.getgeo		= md_getgeo,
a564e23f0f9975 Christoph Hellwig 2020-07-08  8422  	.check_events	= md_check_events,
118cf084adb396 Christoph Hellwig 2020-11-03  8423  	.set_read_only	= md_set_read_only,
e8c59ac4197443 Christoph Hellwig 2022-07-19  8424  	.free_disk	= md_free_disk,
^1da177e4c3f41 Linus Torvalds    2005-04-16  8425  };
^1da177e4c3f41 Linus Torvalds    2005-04-16  8426  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ