[mcgrof-next:20211116-sysctl-cleanups-v4 19/35] fs/proc/proc_sysctl.c:44:9: error: incompatible pointer types returning 'struct ctl_table_header *' from a function with result type 'struct sysctl_header *'

From: kernel test robot
Date: Thu Nov 18 2021 - 07:53:14 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20211116-sysctl-cleanups-v4
head: 5347239461f25fc50aa761923245b9ec4a4aafec
commit: 80084262576dad57737fa04b203e1547ff7ad538 [19/35] sysctl: add helper to register a sysctl mount point
config: i386-randconfig-c001-20211118 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project c46becf500df2a7fb4b4fce16178a036c344315a)
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=80084262576dad57737fa04b203e1547ff7ad538
git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
git fetch --no-tags mcgrof-next 20211116-sysctl-cleanups-v4
git checkout 80084262576dad57737fa04b203e1547ff7ad538
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386

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

All errors (new ones prefixed by >>):

>> fs/proc/proc_sysctl.c:44:9: error: incompatible pointer types returning 'struct ctl_table_header *' from a function with result type 'struct sysctl_header *' [-Werror,-Wincompatible-pointer-types]
return register_sysctl(path, sysctl_mount_point);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.


vim +44 fs/proc/proc_sysctl.c

36
37 /*
38 * Used to create permanently empty directories to serve as mount points.
39 * There are some subtle but important permission checks this allows in the
40 * case of unprivileged mounts.
41 */
42 struct sysctl_header *register_sysctl_mount_point(const char *path)
43 {
> 44 return register_sysctl(path, sysctl_mount_point);
45 }
46

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip