* [PATCH] fs: remove stale and duplicate forward declarations
@ 2025-12-29 7:14 Yuto Ohnuki
2025-12-30 12:20 ` kernel test robot
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Yuto Ohnuki @ 2025-12-29 7:14 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara, linux-fsdevel,
linux-kernel
Cc: Yuto Ohnuki
Remove the following unnecessary forward declarations from fs.h, which
improves maintainability.
- struct hd_geometry: became unused when block_device_operations was
moved to blkdev.h in commit 08f858512151 ("[PATCH] move
block_device_operations to blkdev.h")
- struct iovec: became unused when aio_read/aio_write were removed in
commit 8436318205b9 ("->aio_read and ->aio_write removed")
- struct iov_iter (line 1910): duplicate of the declaration at line 70,
added in commit 293bc9822fa9 ("new methods: ->read_iter()
and ->write_iter()")
Signed-off-by: Yuto Ohnuki <ytohnuki@amazon.com>
---
include/linux/fs.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f5c9cf28c4dc..598096ec2dee 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -55,8 +55,6 @@ struct bdi_writeback;
struct bio;
struct io_comp_batch;
struct fiemap_extent_info;
-struct hd_geometry;
-struct iovec;
struct kiocb;
struct kobject;
struct pipe_inode_info;
@@ -1907,7 +1905,6 @@ struct dir_context {
*/
#define COPY_FILE_SPLICE (1 << 0)
-struct iov_iter;
struct io_uring_cmd;
struct offset_ctx;
--
2.50.1
Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] fs: remove stale and duplicate forward declarations
2025-12-29 7:14 [PATCH] fs: remove stale and duplicate forward declarations Yuto Ohnuki
@ 2025-12-30 12:20 ` kernel test robot
2025-12-30 13:58 ` kernel test robot
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-12-30 12:20 UTC (permalink / raw)
To: Yuto Ohnuki, Alexander Viro, Christian Brauner, Jan Kara,
linux-fsdevel, linux-kernel
Cc: oe-kbuild-all, Yuto Ohnuki
Hi Yuto,
kernel test robot noticed the following build warnings:
[auto build test WARNING on brauner-vfs/vfs.all]
[also build test WARNING on linus/master v6.19-rc3 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-rust (https://download.01.org/0day-ci/archive/20251230/202512301303.s7YWTZHA-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
rustc: rustc 1.88.0 (6b00bc388 2025-06-23)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251230/202512301303.s7YWTZHA-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512301303.s7YWTZHA-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> clang diag: include/linux/blkdev.h:1656:41: warning: declaration of 'struct hd_geometry' will not be visible outside of this function [-Wvisibility]
--
In file included from rust/helpers/helpers.c:16:
In file included from rust/helpers/blk.c:3:
In file included from include/linux/blk-mq.h:5:
>> include/linux/blkdev.h:1656:41: warning: declaration of 'struct hd_geometry' will not be visible outside of this function [-Wvisibility]
1656 | int (*getgeo)(struct gendisk *, struct hd_geometry *);
| ^
1 warning generated.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fs: remove stale and duplicate forward declarations
2025-12-29 7:14 [PATCH] fs: remove stale and duplicate forward declarations Yuto Ohnuki
2025-12-30 12:20 ` kernel test robot
@ 2025-12-30 13:58 ` kernel test robot
2025-12-30 13:58 ` kernel test robot
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-12-30 13:58 UTC (permalink / raw)
To: Yuto Ohnuki, Alexander Viro, Christian Brauner, Jan Kara,
linux-fsdevel, linux-kernel
Cc: llvm, oe-kbuild-all, Yuto Ohnuki
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.19-rc3 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-allnoconfig (https://download.01.org/0day-ci/archive/20251230/202512302139.Wl0soAlz-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251230/202512302139.Wl0soAlz-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512302139.Wl0soAlz-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from block/bdev.c:14:
>> include/linux/blkdev.h:1656:41: warning: declaration of 'struct hd_geometry' will not be visible outside of this function [-Wvisibility]
1656 | int (*getgeo)(struct gendisk *, struct hd_geometry *);
| ^
1 warning generated.
--
In file included from block/ioctl.c:4:
>> include/linux/blkdev.h:1656:41: warning: declaration of 'struct hd_geometry' will not be visible outside of this function [-Wvisibility]
1656 | int (*getgeo)(struct gendisk *, struct hd_geometry *);
| ^
>> block/ioctl.c:564:33: error: incompatible pointer types passing 'struct hd_geometry *' to parameter of type 'struct hd_geometry *' [-Werror,-Wincompatible-pointer-types]
564 | ret = disk->fops->getgeo(disk, &geo);
| ^~~~
1 warning and 1 error generated.
vim +564 block/ioctl.c
d30a2605be9d513 David Woodhouse 2008-08-11 545
d8e4bb8103df02a Christoph Hellwig 2015-10-15 546 static int blkdev_getgeo(struct block_device *bdev,
d8e4bb8103df02a Christoph Hellwig 2015-10-15 547 struct hd_geometry __user *argp)
d8e4bb8103df02a Christoph Hellwig 2015-10-15 548 {
d8e4bb8103df02a Christoph Hellwig 2015-10-15 549 struct gendisk *disk = bdev->bd_disk;
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 550 struct hd_geometry geo;
d8e4bb8103df02a Christoph Hellwig 2015-10-15 551 int ret;
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 552
d8e4bb8103df02a Christoph Hellwig 2015-10-15 553 if (!argp)
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 554 return -EINVAL;
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 555 if (!disk->fops->getgeo)
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 556 return -ENOTTY;
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 557
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 558 /*
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 559 * We need to set the startsect first, the driver may
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 560 * want to override it.
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 561 */
a014741c0adfb8f Vasiliy Kulikov 2010-11-08 562 memset(&geo, 0, sizeof(geo));
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 563 geo.start = get_start_sect(bdev);
4fc8728aa34f548 Al Viro 2024-05-21 @564 ret = disk->fops->getgeo(disk, &geo);
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 565 if (ret)
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 566 return ret;
d8e4bb8103df02a Christoph Hellwig 2015-10-15 567 if (copy_to_user(argp, &geo, sizeof(geo)))
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 568 return -EFAULT;
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 569 return 0;
a885c8c4316e1c1 Christoph Hellwig 2006-01-08 570 }
d8e4bb8103df02a Christoph Hellwig 2015-10-15 571
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fs: remove stale and duplicate forward declarations
2025-12-29 7:14 [PATCH] fs: remove stale and duplicate forward declarations Yuto Ohnuki
2025-12-30 12:20 ` kernel test robot
2025-12-30 13:58 ` kernel test robot
@ 2025-12-30 13:58 ` kernel test robot
2025-12-30 13:58 ` kernel test robot
2025-12-30 20:34 ` kernel test robot
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-12-30 13:58 UTC (permalink / raw)
To: Yuto Ohnuki, Alexander Viro, Christian Brauner, Jan Kara,
linux-fsdevel, linux-kernel
Cc: llvm, oe-kbuild-all, Yuto Ohnuki
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.19-rc3 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: s390-allnoconfig (https://download.01.org/0day-ci/archive/20251230/202512302105.pmzYfmcV-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 86b9f90b9574b3a7d15d28a91f6316459dcfa046)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251230/202512302105.pmzYfmcV-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512302105.pmzYfmcV-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from block/ioctl.c:4:
include/linux/blkdev.h:1656:41: warning: declaration of 'struct hd_geometry' will not be visible outside of this function [-Wvisibility]
1656 | int (*getgeo)(struct gendisk *, struct hd_geometry *);
| ^
>> block/ioctl.c:564:33: error: incompatible pointer types passing 'struct hd_geometry *' to parameter of type 'struct hd_geometry *' [-Wincompatible-pointer-types]
564 | ret = disk->fops->getgeo(disk, &geo);
| ^~~~
1 warning and 1 error generated.
vim +564 block/ioctl.c
d30a2605be9d51 David Woodhouse 2008-08-11 545
d8e4bb8103df02 Christoph Hellwig 2015-10-15 546 static int blkdev_getgeo(struct block_device *bdev,
d8e4bb8103df02 Christoph Hellwig 2015-10-15 547 struct hd_geometry __user *argp)
d8e4bb8103df02 Christoph Hellwig 2015-10-15 548 {
d8e4bb8103df02 Christoph Hellwig 2015-10-15 549 struct gendisk *disk = bdev->bd_disk;
a885c8c4316e1c Christoph Hellwig 2006-01-08 550 struct hd_geometry geo;
d8e4bb8103df02 Christoph Hellwig 2015-10-15 551 int ret;
a885c8c4316e1c Christoph Hellwig 2006-01-08 552
d8e4bb8103df02 Christoph Hellwig 2015-10-15 553 if (!argp)
a885c8c4316e1c Christoph Hellwig 2006-01-08 554 return -EINVAL;
a885c8c4316e1c Christoph Hellwig 2006-01-08 555 if (!disk->fops->getgeo)
a885c8c4316e1c Christoph Hellwig 2006-01-08 556 return -ENOTTY;
a885c8c4316e1c Christoph Hellwig 2006-01-08 557
a885c8c4316e1c Christoph Hellwig 2006-01-08 558 /*
a885c8c4316e1c Christoph Hellwig 2006-01-08 559 * We need to set the startsect first, the driver may
a885c8c4316e1c Christoph Hellwig 2006-01-08 560 * want to override it.
a885c8c4316e1c Christoph Hellwig 2006-01-08 561 */
a014741c0adfb8 Vasiliy Kulikov 2010-11-08 562 memset(&geo, 0, sizeof(geo));
a885c8c4316e1c Christoph Hellwig 2006-01-08 563 geo.start = get_start_sect(bdev);
4fc8728aa34f54 Al Viro 2024-05-21 @564 ret = disk->fops->getgeo(disk, &geo);
a885c8c4316e1c Christoph Hellwig 2006-01-08 565 if (ret)
a885c8c4316e1c Christoph Hellwig 2006-01-08 566 return ret;
d8e4bb8103df02 Christoph Hellwig 2015-10-15 567 if (copy_to_user(argp, &geo, sizeof(geo)))
a885c8c4316e1c Christoph Hellwig 2006-01-08 568 return -EFAULT;
a885c8c4316e1c Christoph Hellwig 2006-01-08 569 return 0;
a885c8c4316e1c Christoph Hellwig 2006-01-08 570 }
d8e4bb8103df02 Christoph Hellwig 2015-10-15 571
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fs: remove stale and duplicate forward declarations
2025-12-29 7:14 [PATCH] fs: remove stale and duplicate forward declarations Yuto Ohnuki
` (2 preceding siblings ...)
2025-12-30 13:58 ` kernel test robot
@ 2025-12-30 13:58 ` kernel test robot
2025-12-30 20:34 ` kernel test robot
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-12-30 13:58 UTC (permalink / raw)
To: Yuto Ohnuki, Alexander Viro, Christian Brauner, Jan Kara,
linux-fsdevel, linux-kernel
Cc: oe-kbuild-all, Yuto Ohnuki
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.19-rc3 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: nios2-allnoconfig (https://download.01.org/0day-ci/archive/20251230/202512302125.FNgHwu5z-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251230/202512302125.FNgHwu5z-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512302125.FNgHwu5z-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 [-Werror=incompatible-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 *'
cc1: some warnings being treated as errors
vim +1656 include/linux/blkdev.h
9208d414975895 Christoph Hellwig 2021-10-21 1642
08f85851215100 Al Viro 2007-10-08 1643 struct block_device_operations {
3e08773c3841e9 Christoph Hellwig 2021-10-12 1644 void (*submit_bio)(struct bio *bio);
69fe0f29892077 Ming Lei 2022-03-04 1645 int (*poll_bio)(struct bio *bio, struct io_comp_batch *iob,
69fe0f29892077 Ming Lei 2022-03-04 1646 unsigned int flags);
05bdb9965305bb Christoph Hellwig 2023-06-08 1647 int (*open)(struct gendisk *disk, blk_mode_t mode);
ae220766d87cd6 Christoph Hellwig 2023-06-08 1648 void (*release)(struct gendisk *disk);
05bdb9965305bb Christoph Hellwig 2023-06-08 1649 int (*ioctl)(struct block_device *bdev, blk_mode_t mode,
05bdb9965305bb Christoph Hellwig 2023-06-08 1650 unsigned cmd, unsigned long arg);
05bdb9965305bb Christoph Hellwig 2023-06-08 1651 int (*compat_ioctl)(struct block_device *bdev, blk_mode_t mode,
05bdb9965305bb Christoph Hellwig 2023-06-08 1652 unsigned cmd, unsigned long arg);
77ea887e433ad8 Tejun Heo 2010-12-08 1653 unsigned int (*check_events) (struct gendisk *disk,
77ea887e433ad8 Tejun Heo 2010-12-08 1654 unsigned int clearing);
c3e33e043f5e9c Tejun Heo 2010-05-15 1655 void (*unlock_native_capacity) (struct gendisk *);
4fc8728aa34f54 Al Viro 2024-05-21 @1656 int (*getgeo)(struct gendisk *, struct hd_geometry *);
e00adcadf3af7a Christoph Hellwig 2020-11-03 1657 int (*set_read_only)(struct block_device *bdev, bool ro);
76792055c4c8b2 Christoph Hellwig 2022-02-15 1658 void (*free_disk)(struct gendisk *disk);
b3a27d0529c6e5 Nitin Gupta 2010-05-17 1659 /* this callback is with swap_lock and sometimes page table lock held */
b3a27d0529c6e5 Nitin Gupta 2010-05-17 1660 void (*swap_slot_free_notify) (struct block_device *, unsigned long);
e76239a3748c90 Christoph Hellwig 2018-10-12 1661 int (*report_zones)(struct gendisk *, sector_t sector,
fdb9aed869f34d Damien Le Moal 2025-11-05 1662 unsigned int nr_zones,
fdb9aed869f34d Damien Le Moal 2025-11-05 1663 struct blk_report_zones_args *args);
050a4f341f35bf Jens Axboe 2023-01-04 1664 char *(*devnode)(struct gendisk *disk, umode_t *mode);
9208d414975895 Christoph Hellwig 2021-10-21 1665 /* returns the length of the identifier or a negative errno: */
9208d414975895 Christoph Hellwig 2021-10-21 1666 int (*get_unique_id)(struct gendisk *disk, u8 id[16],
9208d414975895 Christoph Hellwig 2021-10-21 1667 enum blk_unique_id id_type);
08f85851215100 Al Viro 2007-10-08 1668 struct module *owner;
bbd3e064362e50 Christoph Hellwig 2015-10-15 1669 const struct pr_ops *pr_ops;
0bdfbca8a623e2 Dmitry Osipenko 2021-08-20 1670
0bdfbca8a623e2 Dmitry Osipenko 2021-08-20 1671 /*
0bdfbca8a623e2 Dmitry Osipenko 2021-08-20 1672 * Special callback for probing GPT entry at a given sector.
0bdfbca8a623e2 Dmitry Osipenko 2021-08-20 1673 * Needed by Android devices, used by GPT scanner and MMC blk
0bdfbca8a623e2 Dmitry Osipenko 2021-08-20 1674 * driver.
0bdfbca8a623e2 Dmitry Osipenko 2021-08-20 1675 */
0bdfbca8a623e2 Dmitry Osipenko 2021-08-20 1676 int (*alternative_gpt_sector)(struct gendisk *disk, sector_t *sector);
08f85851215100 Al Viro 2007-10-08 1677 };
08f85851215100 Al Viro 2007-10-08 1678
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fs: remove stale and duplicate forward declarations
2025-12-29 7:14 [PATCH] fs: remove stale and duplicate forward declarations Yuto Ohnuki
` (3 preceding siblings ...)
2025-12-30 13:58 ` kernel test robot
@ 2025-12-30 20:34 ` kernel test robot
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2025-12-30 20:34 UTC (permalink / raw)
To: Yuto Ohnuki, Alexander Viro, Christian Brauner, Jan Kara,
linux-fsdevel, linux-kernel
Cc: oe-kbuild-all, Yuto Ohnuki
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@intel.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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-12-30 20:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-29 7:14 [PATCH] fs: remove stale and duplicate forward declarations Yuto Ohnuki
2025-12-30 12:20 ` kernel test robot
2025-12-30 13:58 ` kernel test robot
2025-12-30 13:58 ` kernel test robot
2025-12-30 13:58 ` kernel test robot
2025-12-30 20:34 ` 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.