Messages in this thread | | | Date | Fri, 19 Nov 2021 17:40:45 +0800 | From | kernel test robot <> | Subject | [mcgrof-next:20211118-sysctl-cleanups-set-04-v2 31/36] fs/locks.c:118:58: error: macro "register_sysctl_init" passed 3 arguments, but takes just 2 |
| |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20211118-sysctl-cleanups-set-04-v2 head: 3110d41a56792588bd2f64621080948b0fceb6ab commit: 92edf8c99bc06bc2035ccfcd1c852303bb555db1 [31/36] fs: move locking sysctls where they are used config: nds32-allnoconfig (attached as .config) compiler: nds32le-linux-gcc (GCC) 11.2.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/mcgrof/linux-next.git/commit/?id=92edf8c99bc06bc2035ccfcd1c852303bb555db1 git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git git fetch --no-tags mcgrof-next 20211118-sysctl-cleanups-set-04-v2 git checkout 92edf8c99bc06bc2035ccfcd1c852303bb555db1 # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=nds32 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
fs/locks.c: In function 'init_fs_locks_sysctls': >> fs/locks.c:118:58: error: macro "register_sysctl_init" passed 3 arguments, but takes just 2 118 | register_sysctl_init("fs", locks_sysctls, "locks"); | ^ In file included from include/linux/key.h:17, from include/linux/cred.h:13, from include/linux/sched/signal.h:10, from include/linux/rcuwait.h:6, from include/linux/percpu-rwsem.h:7, from include/linux/fs.h:33, from include/linux/fdtable.h:16, from fs/locks.c:54: include/linux/sysctl.h:220: note: macro "register_sysctl_init" defined here 220 | #define register_sysctl_init(path, table) __register_sysctl_init(path, table, #table) | >> fs/locks.c:118:9: error: 'register_sysctl_init' undeclared (first use in this function); did you mean 'register_sysctl_paths'? 118 | register_sysctl_init("fs", locks_sysctls, "locks"); | ^~~~~~~~~~~~~~~~~~~~ | register_sysctl_paths fs/locks.c:118:9: note: each undeclared identifier is reported only once for each function it appears in At top level: fs/locks.c:96:25: warning: 'locks_sysctls' defined but not used [-Wunused-variable] 96 | static struct ctl_table locks_sysctls[] = { | ^~~~~~~~~~~~~
vim +/register_sysctl_init +118 fs/locks.c
> 54 #include <linux/fdtable.h> 55 #include <linux/fs.h> 56 #include <linux/init.h> 57 #include <linux/security.h> 58 #include <linux/slab.h> 59 #include <linux/syscalls.h> 60 #include <linux/time.h> 61 #include <linux/rcupdate.h> 62 #include <linux/pid_namespace.h> 63 #include <linux/hashtable.h> 64 #include <linux/percpu.h> 65 #include <linux/sysctl.h> 66 67 #define CREATE_TRACE_POINTS 68 #include <trace/events/filelock.h> 69 70 #include <linux/uaccess.h> 71 72 #define IS_POSIX(fl) (fl->fl_flags & FL_POSIX) 73 #define IS_FLOCK(fl) (fl->fl_flags & FL_FLOCK) 74 #define IS_LEASE(fl) (fl->fl_flags & (FL_LEASE|FL_DELEG|FL_LAYOUT)) 75 #define IS_OFDLCK(fl) (fl->fl_flags & FL_OFDLCK) 76 #define IS_REMOTELCK(fl) (fl->fl_pid <= 0) 77 78 static bool lease_breaking(struct file_lock *fl) 79 { 80 return fl->fl_flags & (FL_UNLOCK_PENDING | FL_DOWNGRADE_PENDING); 81 } 82 83 static int target_leasetype(struct file_lock *fl) 84 { 85 if (fl->fl_flags & FL_UNLOCK_PENDING) 86 return F_UNLCK; 87 if (fl->fl_flags & FL_DOWNGRADE_PENDING) 88 return F_RDLCK; 89 return fl->fl_type; 90 } 91 92 static int leases_enable = 1; 93 static int lease_break_time = 45; 94 95 #ifdef CONFIG_SYSCTL 96 static struct ctl_table locks_sysctls[] = { 97 { 98 .procname = "leases-enable", 99 .data = &leases_enable, 100 .maxlen = sizeof(int), 101 .mode = 0644, 102 .proc_handler = proc_dointvec, 103 }, 104 #ifdef CONFIG_MMU 105 { 106 .procname = "lease-break-time", 107 .data = &lease_break_time, 108 .maxlen = sizeof(int), 109 .mode = 0644, 110 .proc_handler = proc_dointvec, 111 }, 112 #endif /* CONFIG_MMU */ 113 {} 114 }; 115 116 static int __init init_fs_locks_sysctls(void) 117 { > 118 register_sysctl_init("fs", locks_sysctls, "locks"); 119 return 0; 120 } 121 early_initcall(init_fs_locks_sysctls); 122 #endif /* CONFIG_SYSCTL */ 123
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |