Hi lingfuyi, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.4-rc3 next-20230523] [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/lingfuyi/io_uring-fix-compile-error-when-CONFIG_IO_URING-not-set/20230523-195542 base: linus/master patch link: https://lore.kernel.org/r/20230523092629.3402710-1-lingfuyi%40126.com patch subject: [PATCH] io_uring: fix compile error when CONFIG_IO_URING not set config: i386-randconfig-i065-20230523 compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1) 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://github.com/intel-lab-lkp/linux/commit/82c556d20b38c439dafca8e7256eeba39980b58b git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review lingfuyi/io_uring-fix-compile-error-when-CONFIG_IO_URING-not-set/20230523-195542 git checkout 82c556d20b38c439dafca8e7256eeba39980b58b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202305241142.zwCaplRg-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from kernel/fork.c:97: >> include/linux/io_uring.h:101:27: error: redefinition of 'io_uring_sqe_cmd' static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe) ^ include/linux/io_uring.h:39:27: note: previous definition is here static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe) ^ 1 error generated. -- In file included from kernel/exit.c:67: >> include/linux/io_uring.h:101:27: error: redefinition of 'io_uring_sqe_cmd' static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe) ^ include/linux/io_uring.h:39:27: note: previous definition is here static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe) ^ kernel/exit.c:1917:32: warning: no previous prototype for function 'abort' [-Wmissing-prototypes] __weak __function_aligned void abort(void) ^ kernel/exit.c:1917:27: note: declare 'static' if the function is not intended to be used outside of this translation unit __weak __function_aligned void abort(void) ^ static 1 warning and 1 error generated. vim +/io_uring_sqe_cmd +101 include/linux/io_uring.h 56 57 static inline void io_uring_files_cancel(void) 58 { 59 if (current->io_uring) { 60 io_uring_unreg_ringfd(); 61 __io_uring_cancel(false); 62 } 63 } 64 static inline void io_uring_task_cancel(void) 65 { 66 if (current->io_uring) 67 __io_uring_cancel(true); 68 } 69 static inline void io_uring_free(struct task_struct *tsk) 70 { 71 if (tsk->io_uring) 72 __io_uring_free(tsk); 73 } 74 #else 75 static inline int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw, 76 struct iov_iter *iter, void *ioucmd) 77 { 78 return -EOPNOTSUPP; 79 } 80 static inline void io_uring_cmd_done(struct io_uring_cmd *cmd, ssize_t ret, 81 ssize_t ret2, unsigned issue_flags) 82 { 83 } 84 static inline void io_uring_cmd_complete_in_task(struct io_uring_cmd *ioucmd, 85 void (*task_work_cb)(struct io_uring_cmd *, unsigned)) 86 { 87 } 88 static inline struct sock *io_uring_get_socket(struct file *file) 89 { 90 return NULL; 91 } 92 static inline void io_uring_task_cancel(void) 93 { 94 } 95 static inline void io_uring_files_cancel(void) 96 { 97 } 98 static inline void io_uring_free(struct task_struct *tsk) 99 { 100 } > 101 static inline const void *io_uring_sqe_cmd(const struct io_uring_sqe *sqe) 102 { 103 return NULL; 104 } 105 static inline const char *io_uring_get_opcode(u8 opcode) 106 { 107 return ""; 108 } 109 #endif 110 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki