[vfs:work.inode-type-fixes 15/15] arch/powerpc/platforms/cell/spufs/inode.c:239:36: error: passing argument 3 of 'inode_init_owner' makes pointer from integer without a cast

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.inode-type-fixes
head:   9e7ee6c2aa386ab21585648e091aab65c0a86f23
commit: 9e7ee6c2aa386ab21585648e091aab65c0a86f23 [15/15] spufs: fix bogosity in S_ISGID handling
config: powerpc64-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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/viro/vfs.git/commit/?id=9e7ee6c2aa386ab21585648e091aab65c0a86f23
        git remote add vfs https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
        git fetch --no-tags vfs work.inode-type-fixes
        git checkout 9e7ee6c2aa386ab21585648e091aab65c0a86f23
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64 

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

All errors (new ones prefixed by >>):

   arch/powerpc/platforms/cell/spufs/inode.c: In function 'spufs_mkdir':
   arch/powerpc/platforms/cell/spufs/inode.c:239:19: error: passing argument 1 of 'inode_init_owner' from incompatible pointer type [-Werror=incompatible-pointer-types]
     239 |  inode_init_owner(inode, dir, mode | S_IFDIR);
         |                   ^~~~~
         |                   |
         |                   struct inode *
   In file included from arch/powerpc/platforms/cell/spufs/inode.c:12:
   include/linux/fs.h:1828:46: note: expected 'struct user_namespace *' but argument is of type 'struct inode *'
    1828 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,
         |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
>> arch/powerpc/platforms/cell/spufs/inode.c:239:36: error: passing argument 3 of 'inode_init_owner' makes pointer from integer without a cast [-Werror=int-conversion]
     239 |  inode_init_owner(inode, dir, mode | S_IFDIR);
   In file included from arch/powerpc/platforms/cell/spufs/inode.c:12:
   include/linux/fs.h:1829:29: note: expected 'const struct inode *' but argument is of type 'int'
    1829 |         const struct inode *dir, umode_t mode);
         |         ~~~~~~~~~~~~~~~~~~~~^~~
   arch/powerpc/platforms/cell/spufs/inode.c:239:2: error: too few arguments to function 'inode_init_owner'
     239 |  inode_init_owner(inode, dir, mode | S_IFDIR);
         |  ^~~~~~~~~~~~~~~~
   In file included from arch/powerpc/platforms/cell/spufs/inode.c:12:
   include/linux/fs.h:1828:6: note: declared here
    1828 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,
         |      ^~~~~~~~~~~~~~~~
   arch/powerpc/platforms/cell/spufs/inode.c: In function 'spufs_mkgang':
   arch/powerpc/platforms/cell/spufs/inode.c:470:19: error: passing argument 1 of 'inode_init_owner' from incompatible pointer type [-Werror=incompatible-pointer-types]
     470 |  inode_init_owner(inode, dir, mode | S_IFDIR);
         |                   ^~~~~
         |                   |
         |                   struct inode *
   In file included from arch/powerpc/platforms/cell/spufs/inode.c:12:
   include/linux/fs.h:1828:46: note: expected 'struct user_namespace *' but argument is of type 'struct inode *'
    1828 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,
         |                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
   arch/powerpc/platforms/cell/spufs/inode.c:470:36: error: passing argument 3 of 'inode_init_owner' makes pointer from integer without a cast [-Werror=int-conversion]
     470 |  inode_init_owner(inode, dir, mode | S_IFDIR);
   In file included from arch/powerpc/platforms/cell/spufs/inode.c:12:
   include/linux/fs.h:1829:29: note: expected 'const struct inode *' but argument is of type 'int'
    1829 |         const struct inode *dir, umode_t mode);
         |         ~~~~~~~~~~~~~~~~~~~~^~~
   arch/powerpc/platforms/cell/spufs/inode.c:470:2: error: too few arguments to function 'inode_init_owner'
     470 |  inode_init_owner(inode, dir, mode | S_IFDIR);
         |  ^~~~~~~~~~~~~~~~
   In file included from arch/powerpc/platforms/cell/spufs/inode.c:12:
   include/linux/fs.h:1828:6: note: declared here
    1828 | void inode_init_owner(struct user_namespace *mnt_userns, struct inode *inode,
         |      ^~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +/inode_init_owner +239 arch/powerpc/platforms/cell/spufs/inode.c

   226	
   227	static int
   228	spufs_mkdir(struct inode *dir, struct dentry *dentry, unsigned int flags,
   229			umode_t mode)
   230	{
   231		int ret;
   232		struct inode *inode;
   233		struct spu_context *ctx;
   234	
   235		inode = spufs_new_inode(dir->i_sb, mode | S_IFDIR);
   236		if (!inode)
   237			return -ENOSPC;
   238	
 > 239		inode_init_owner(inode, dir, mode | S_IFDIR);
   240		ctx = alloc_spu_context(SPUFS_I(dir)->i_gang); /* XXX gang */
   241		SPUFS_I(inode)->i_ctx = ctx;
   242		if (!ctx) {
   243			iput(inode);
   244			return -ENOSPC;
   245		}
   246	
   247		ctx->flags = flags;
   248		inode->i_op = &simple_dir_inode_operations;
   249		inode->i_fop = &simple_dir_operations;
   250	
   251		inode_lock(inode);
   252	
   253		dget(dentry);
   254		inc_nlink(dir);
   255		inc_nlink(inode);
   256	
   257		d_instantiate(dentry, inode);
   258	
   259		if (flags & SPU_CREATE_NOSCHED)
   260			ret = spufs_fill_dir(dentry, spufs_dir_nosched_contents,
   261						 mode, ctx);
   262		else
   263			ret = spufs_fill_dir(dentry, spufs_dir_contents, mode, ctx);
   264	
   265		if (!ret && spufs_get_sb_info(dir->i_sb)->debug)
   266			ret = spufs_fill_dir(dentry, spufs_dir_debug_contents,
   267					mode, ctx);
   268	
   269		if (ret)
   270			spufs_rmdir(dir, dentry);
   271	
   272		inode_unlock(inode);
   273	
   274		return ret;
   275	}
   276	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux