tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 8c22cbd025b67d03da84cc988561b6a758e882ee commit: 7d2bb3c7646cf1ebe76de965c3b31d7bc2b89845 [3450/3450] xsched: fix compile error when CONFIG_XCU_SCHEDULER is disabled config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20251203/202512032006.udjnn6SV-lkp@i...) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251203/202512032006.udjnn6SV-lkp@i...) 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/202512032006.udjnn6SV-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from kernel/xsched/vstream.c:21: include/linux/syscalls.h:954:54: warning: declaration of 'struct xsched_attr' will not be visible outside of this function [-Wvisibility] 954 | asmlinkage long sys_xsched_setattr(pid_t pid, struct xsched_attr __user *arg); | ^ include/linux/syscalls.h:955:54: warning: declaration of 'struct xsched_attr' will not be visible outside of this function [-Wvisibility] 955 | asmlinkage long sys_xsched_getattr(pid_t pid, struct xsched_attr __user *arg); | ^
kernel/xsched/vstream.c:660:1: error: conflicting types for 'sys_xsched_setattr' 660 | SYSCALL_DEFINE2(xsched_setattr, pid_t, pid, struct xsched_attr __user *, arg) | ^ include/linux/syscalls.h:222:36: note: expanded from macro 'SYSCALL_DEFINE2' 222 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) | ^ include/linux/syscalls.h:232:2: note: expanded from macro 'SYSCALL_DEFINEx' 232 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) | ^ include/linux/syscalls.h:246:18: note: expanded from macro '__SYSCALL_DEFINEx' 246 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | ^ <scratch space>:72:1: note: expanded from here 72 | sys_xsched_setattr | ^ include/linux/syscalls.h:954:17: note: previous declaration is here 954 | asmlinkage long sys_xsched_setattr(pid_t pid, struct xsched_attr __user *arg); | ^ kernel/xsched/vstream.c:665:1: error: conflicting types for 'sys_xsched_getattr' 665 | SYSCALL_DEFINE2(xsched_getattr, pid_t, pid, struct xsched_attr __user *, arg) | ^ include/linux/syscalls.h:222:36: note: expanded from macro 'SYSCALL_DEFINE2' 222 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name, __VA_ARGS__) | ^ include/linux/syscalls.h:232:2: note: expanded from macro 'SYSCALL_DEFINEx' 232 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) | ^ include/linux/syscalls.h:246:18: note: expanded from macro '__SYSCALL_DEFINEx' 246 | asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \ | ^ <scratch space>:127:1: note: expanded from here 127 | sys_xsched_getattr | ^ include/linux/syscalls.h:955:17: note: previous declaration is here 955 | asmlinkage long sys_xsched_getattr(pid_t pid, struct xsched_attr __user *arg); | ^ 2 warnings and 2 errors generated.
vim +/sys_xsched_setattr +660 kernel/xsched/vstream.c 659
660 SYSCALL_DEFINE2(xsched_setattr, pid_t, pid, struct xsched_attr __user *, arg) 661 { 662 return 0; 663 } 664 665 SYSCALL_DEFINE2(xsched_getattr, pid_t, pid, struct xsched_attr __user *, arg)
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki