oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [mcgrof:sysctl-testing-opt 2/20] fs/proc/proc_sysctl.c:1287:8: error: must use 'struct' tag to refer to type 'ctl_dir'
@ 2023-03-02  4:52 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-03-02  4:52 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: llvm, oe-kbuild-all

Hi Luis,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-testing-opt
head:   4ac91d63df04d5f5e9830394b6d266adb2a21585
commit: 16bbd0aea0b8edb87a0133affeaad33820ce81f9 [2/20] proc_sysctl: move helper which creates required subdirectories
config: hexagon-buildonly-randconfig-r005-20230302 (https://download.01.org/0day-ci/archive/20230302/202303021239.XT7Oo08R-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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.git/commit/?id=16bbd0aea0b8edb87a0133affeaad33820ce81f9
        git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
        git fetch --no-tags mcgrof sysctl-testing-opt
        git checkout 16bbd0aea0b8edb87a0133affeaad33820ce81f9
        # 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=hexagon olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303021239.XT7Oo08R-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from fs/proc/proc_sysctl.c:17:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:547:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __raw_readb(PCI_IOBASE + addr);
                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:560:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
   #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                                                     ^
   In file included from fs/proc/proc_sysctl.c:17:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:573:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
                                                           ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
   #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                                                     ^
   In file included from fs/proc/proc_sysctl.c:17:
   In file included from include/linux/bpf-cgroup.h:5:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   In file included from include/linux/kernel_stat.h:9:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:13:
   In file included from arch/hexagon/include/asm/io.h:334:
   include/asm-generic/io.h:584:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writeb(value, PCI_IOBASE + addr);
                               ~~~~~~~~~~ ^
   include/asm-generic/io.h:594:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
   include/asm-generic/io.h:604:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
           __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
                                                         ~~~~~~~~~~ ^
>> fs/proc/proc_sysctl.c:1287:8: error: must use 'struct' tag to refer to type 'ctl_dir'
   static ctl_dir *dir sysctl_mkdir_p(struct ctl_dir *dir, const char *path)
          ^
          struct 
>> fs/proc/proc_sysctl.c:1287:20: error: expected ';' after top level declarator
   static ctl_dir *dir sysctl_mkdir_p(struct ctl_dir *dir, const char *path)
                      ^
                      ;
   6 warnings and 2 errors generated.


vim +1287 fs/proc/proc_sysctl.c

  1285	
  1286	/* Find or the directory for the ctl_table. If one is not found create it. */
> 1287	static ctl_dir *dir sysctl_mkdir_p(struct ctl_dir *dir, const char *path)
  1288	{
  1289		const char *name, *nextname;
  1290	
  1291		for (name = path; name; name = nextname) {
  1292			int namelen;
  1293			nextname = strchr(name, '/');
  1294			if (nextname) {
  1295				namelen = nextname - name;
  1296				nextname++;
  1297			} else {
  1298				namelen = strlen(name);
  1299			}
  1300			if (namelen == 0)
  1301				continue;
  1302	
  1303			/*
  1304			 * namelen ensures if name is "foo/bar/yay" only foo is
  1305			 * registered first. We traverse as if using mkdir -p and
  1306			 * return a ctl_dir for the last directory entry.
  1307			 */
  1308			dir = get_subdir(dir, name, namelen);
  1309			if (IS_ERR(dir))
  1310				break;
  1311		}
  1312		return dir;
  1313	}
  1314	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [mcgrof:sysctl-testing-opt 2/20] fs/proc/proc_sysctl.c:1287:8: error: must use 'struct' tag to refer to type 'ctl_dir'
@ 2023-03-02  4:52 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2023-03-02  4:52 UTC (permalink / raw)
  To: Luis Chamberlain; +Cc: llvm, oe-kbuild-all

Hi Luis,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git sysctl-testing-opt
head:   4ac91d63df04d5f5e9830394b6d266adb2a21585
commit: 16bbd0aea0b8edb87a0133affeaad33820ce81f9 [2/20] proc_sysctl: move helper which creates required subdirectories
config: x86_64-randconfig-a014 (https://download.01.org/0day-ci/archive/20230302/202303021230.tfoIVroT-lkp@intel.com/config)
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://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git/commit/?id=16bbd0aea0b8edb87a0133affeaad33820ce81f9
        git remote add mcgrof https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git
        git fetch --no-tags mcgrof sysctl-testing-opt
        git checkout 16bbd0aea0b8edb87a0133affeaad33820ce81f9
        # 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=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303021230.tfoIVroT-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/proc/proc_sysctl.c:1287:8: error: must use 'struct' tag to refer to type 'ctl_dir'
   static ctl_dir *dir sysctl_mkdir_p(struct ctl_dir *dir, const char *path)
          ^
          struct 
>> fs/proc/proc_sysctl.c:1287:20: error: expected ';' after top level declarator
   static ctl_dir *dir sysctl_mkdir_p(struct ctl_dir *dir, const char *path)
                      ^
                      ;
   2 errors generated.


vim +1287 fs/proc/proc_sysctl.c

  1285	
  1286	/* Find or the directory for the ctl_table. If one is not found create it. */
> 1287	static ctl_dir *dir sysctl_mkdir_p(struct ctl_dir *dir, const char *path)
  1288	{
  1289		const char *name, *nextname;
  1290	
  1291		for (name = path; name; name = nextname) {
  1292			int namelen;
  1293			nextname = strchr(name, '/');
  1294			if (nextname) {
  1295				namelen = nextname - name;
  1296				nextname++;
  1297			} else {
  1298				namelen = strlen(name);
  1299			}
  1300			if (namelen == 0)
  1301				continue;
  1302	
  1303			/*
  1304			 * namelen ensures if name is "foo/bar/yay" only foo is
  1305			 * registered first. We traverse as if using mkdir -p and
  1306			 * return a ctl_dir for the last directory entry.
  1307			 */
  1308			dir = get_subdir(dir, name, namelen);
  1309			if (IS_ERR(dir))
  1310				break;
  1311		}
  1312		return dir;
  1313	}
  1314	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-02  4:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02  4:52 [mcgrof:sysctl-testing-opt 2/20] fs/proc/proc_sysctl.c:1287:8: error: must use 'struct' tag to refer to type 'ctl_dir' kernel test robot
2023-03-02  4:52 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).