Subject: Re: linux-next: build warnings after merge of the fsinfo tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 28 May 2020 20:11:04 +1000

Hi all,

This should have been the block tree, not the fsinfo tree, of course.

On Thu, 28 May 2020 18:40:17 +1000 Stephen Rothwell <[email-masked]> wrote:
>
> After merging the fsinfo tree, today's linux-next build (x86_64
> allnoconfig) produced these warnings:
> 
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/loadavg.c:9:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from fs/super.c:26:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/clock.c:56:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/idle.c:9:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/cputime.c:5:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/rt.c:6:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/core.c:9:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/swait.c:5:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/wait_bit.c:5:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/fair.c:23:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/wait.c:7:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/deadline.c:18:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from kernel/sched/sched.h:39,
>                  from kernel/sched/completion.c:14:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> In file included from fs/libfs.c:7:
> include/linux/blkdev.h:1895:41: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1895 | unsigned long disk_start_io_acct(struct gendisk *disk, unsigned int sectors,
>       |                                         ^~~~~~~
> include/linux/blkdev.h:1897:30: warning: 'struct gendisk' declared inside parameter list will not be visible outside of this definition or declaration
>  1897 | void disk_end_io_acct(struct gendisk *disk, unsigned int op,
>       |                              ^~~~~~~
> 
> Introduced by commit
> 
>   956d510ee78c ("block: add disk/bio-based accounting helpers")

-- 
Cheers,
Stephen Rothwell