[kbusch:io_uring/dma-register-v3 3/8] include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration

From: kernel test robot
Date: Sat Aug 13 2022 - 09:28:31 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git io_uring/dma-register-v3
head: e1c6d38d05e532b3aaf12a5ab8707929bcdc1180
commit: 59f51e67d3aa45e21c693f274e516a8e307ac829 [3/8] file: add ops to dma map bvec
config: m68k-buildonly-randconfig-r001-20220804 (https://download.01.org/0day-ci/archive/20220813/202208132106.JaGpr7MH-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 12.1.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
# https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git/commit/?id=59f51e67d3aa45e21c693f274e516a8e307ac829
git remote add kbusch https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git
git fetch --no-tags kbusch io_uring/dma-register-v3
git checkout 59f51e67d3aa45e21c693f274e516a8e307ac829
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash arch/m68k/kernel/ io_uring/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from include/linux/seq_file.h:12,
from arch/m68k/kernel/irq.c:17:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
--
In file included from include/linux/huge_mm.h:8,
from include/linux/mm.h:700,
from arch/m68k/kernel/process.c:21:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
arch/m68k/kernel/process.c:114:16: warning: no previous prototype for 'm68k_clone' [-Wmissing-prototypes]
114 | asmlinkage int m68k_clone(struct pt_regs *regs)
| ^~~~~~~~~~
arch/m68k/kernel/process.c:135:16: warning: no previous prototype for 'm68k_clone3' [-Wmissing-prototypes]
135 | asmlinkage int m68k_clone3(struct pt_regs *regs)
| ^~~~~~~~~~~
arch/m68k/kernel/process.c:216:5: warning: no previous prototype for 'dump_fpu' [-Wmissing-prototypes]
216 | int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
| ^~~~~~~~
--
In file included from include/linux/huge_mm.h:8,
from include/linux/mm.h:700,
from arch/m68k/kernel/ptrace.c:16:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
arch/m68k/kernel/ptrace.c:275:16: warning: no previous prototype for 'syscall_trace_enter' [-Wmissing-prototypes]
275 | asmlinkage int syscall_trace_enter(void)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/ptrace.c:284:17: warning: no previous prototype for 'syscall_trace_leave' [-Wmissing-prototypes]
284 | asmlinkage void syscall_trace_leave(void)
| ^~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/huge_mm.h:8,
from include/linux/mm.h:700,
from arch/m68k/kernel/signal.c:32:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
arch/m68k/kernel/signal.c:756:18: warning: no previous prototype for 'do_sigreturn' [-Wmissing-prototypes]
756 | asmlinkage void *do_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
| ^~~~~~~~~~~~
arch/m68k/kernel/signal.c:783:18: warning: no previous prototype for 'do_rt_sigreturn' [-Wmissing-prototypes]
783 | asmlinkage void *do_rt_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
| ^~~~~~~~~~~~~~~
arch/m68k/kernel/signal.c:1106:6: warning: no previous prototype for 'do_notify_resume' [-Wmissing-prototypes]
1106 | void do_notify_resume(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~
--
In file included from include/linux/huge_mm.h:8,
from include/linux/mm.h:700,
from arch/m68k/kernel/sys_m68k.c:13:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
arch/m68k/kernel/sys_m68k.c:535:1: warning: no previous prototype for 'sys_cacheflush' [-Wmissing-prototypes]
535 | sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)
| ^~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:544:1: warning: no previous prototype for 'sys_atomic_cmpxchg_32' [-Wmissing-prototypes]
544 | sys_atomic_cmpxchg_32(unsigned long newval, int oldval, int d3, int d4, int d5,
| ^~~~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:562:16: warning: no previous prototype for 'sys_getpagesize' [-Wmissing-prototypes]
562 | asmlinkage int sys_getpagesize(void)
| ^~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:567:26: warning: no previous prototype for 'sys_get_thread_area' [-Wmissing-prototypes]
567 | asmlinkage unsigned long sys_get_thread_area(void)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:572:16: warning: no previous prototype for 'sys_set_thread_area' [-Wmissing-prototypes]
572 | asmlinkage int sys_set_thread_area(unsigned long tp)
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/kernel/sys_m68k.c:578:16: warning: no previous prototype for 'sys_atomic_barrier' [-Wmissing-prototypes]
578 | asmlinkage int sys_atomic_barrier(void)
| ^~~~~~~~~~~~~~~~~~
--
In file included from include/linux/huge_mm.h:8,
from include/linux/mm.h:700,
from arch/m68k/kernel/time.c:22:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
arch/m68k/kernel/time.c:154:13: warning: no previous prototype for 'time_init' [-Wmissing-prototypes]
154 | void __init time_init(void)
| ^~~~~~~~~
--
In file included from include/linux/huge_mm.h:8,
from include/linux/mm.h:700,
from arch/m68k/kernel/traps.c:25:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
arch/m68k/kernel/traps.c:752:17: warning: no previous prototype for 'buserr_c' [-Wmissing-prototypes]
752 | asmlinkage void buserr_c(struct frame *fp)
| ^~~~~~~~
arch/m68k/kernel/traps.c:966:6: warning: no previous prototype for 'bad_super_trap' [-Wmissing-prototypes]
966 | void bad_super_trap (struct frame *fp)
| ^~~~~~~~~~~~~~
arch/m68k/kernel/traps.c:1138:17: warning: no previous prototype for 'set_esp0' [-Wmissing-prototypes]
1138 | asmlinkage void set_esp0(unsigned long ssp)
| ^~~~~~~~
arch/m68k/kernel/traps.c:1147:17: warning: no previous prototype for 'fpsp040_die' [-Wmissing-prototypes]
1147 | asmlinkage void fpsp040_die(void)
| ^~~~~~~~~~~
--
In file included from include/linux/huge_mm.h:8,
from include/linux/mm.h:700,
from include/linux/pid_namespace.h:7,
from include/linux/ptrace.h:10,
from include/linux/elfcore.h:11,
from include/linux/crash_core.h:6,
from include/linux/kexec.h:18,
from arch/m68k/kernel/machine_kexec.c:6:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
arch/m68k/kernel/machine_kexec.c:26:6: warning: no previous prototype for 'machine_shutdown' [-Wmissing-prototypes]
26 | void machine_shutdown(void)
| ^~~~~~~~~~~~~~~~
arch/m68k/kernel/machine_kexec.c:30:6: warning: no previous prototype for 'machine_crash_shutdown' [-Wmissing-prototypes]
30 | void machine_crash_shutdown(struct pt_regs *regs)
| ^~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/uapi/linux/aio_abi.h:31,
from include/linux/syscalls.h:77,
from io_uring/io_uring.c:45:
>> include/linux/fs.h:3610:60: warning: 'struct bio_vec' declared inside parameter list will not be visible outside of this definition or declaration
3610 | static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
| ^~~~~~~
io_uring/io_uring.c: In function '__io_submit_flush_completions':
io_uring/io_uring.c:1183:40: warning: variable 'prev' set but not used [-Wunused-but-set-variable]
1183 | struct io_wq_work_node *node, *prev;
| ^~~~


vim +3610 include/linux/fs.h

3599
3600 /* mm/fadvise.c */
3601 extern int vfs_fadvise(struct file *file, loff_t offset, loff_t len,
3602 int advice);
3603 extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
3604 int advice);
3605
3606 #ifdef CONFIG_HAS_DMA
3607 void *file_dma_map(struct file *file, struct bio_vec *bvec, int nr_vecs);
3608 void file_dma_unmap(struct file *file, void *dma_tag);
3609 #else
> 3610 static inline void *file_dma_map(struct file *file, struct bio_vec *bvec,
3611 int nr_vecs)
3612 {
3613 return ERR_PTR(-ENOTSUPP);
3614 }
3615 static inline void file_dma_unmap(struct file *file, void *dma_tag) {}
3616 #endif
3617

--
0-DAY CI Kernel Test Service
https://01.org/lkp