[tip:WIP.sched/core 58/63] fs/affs/super.c:199:14: error: incompatible types when assigning to type 'kuid_t' from type 'int'

From: kbuild test robot
Date: Thu Feb 02 2017 - 17:37:43 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.sched/core
head: 7f79b5e3727bae36481c9bc5587291d88742291f
commit: 8bda2af585fe321f2915cc8312fe4b14f8a2e602 [58/63] sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h>
config: m68k-sun3_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 8bda2af585fe321f2915cc8312fe4b14f8a2e602
# save the attached .config to linux build tree
make.cross ARCH=m68k

All errors (new ones prefixed by >>):

fs/affs/super.c: In function 'parse_options':
fs/affs/super.c:199:2: error: implicit declaration of function 'current_uid' [-Werror=implicit-function-declaration]
*uid = current_uid();
^
>> fs/affs/super.c:199:14: error: incompatible types when assigning to type 'kuid_t' from type 'int'
*uid = current_uid();
^
fs/affs/super.c:200:2: error: implicit declaration of function 'current_gid' [-Werror=implicit-function-declaration]
*gid = current_gid();
^
>> fs/affs/super.c:200:14: error: incompatible types when assigning to type 'kgid_t' from type 'int'
*gid = current_gid();
^
fs/affs/super.c:259:4: error: implicit declaration of function 'current_user_ns' [-Werror=implicit-function-declaration]
*gid = make_kgid(current_user_ns(), option);
^
fs/affs/super.c:259:11: warning: passing argument 1 of 'make_kgid' makes pointer from integer without a cast
*gid = make_kgid(current_user_ns(), option);
^
In file included from include/linux/stat.h:19:0,
from include/linux/module.h:10,
from fs/affs/super.c:13:
include/linux/uidgid.h:147:22: note: expected 'struct user_namespace *' but argument is of type 'int'
static inline kgid_t make_kgid(struct user_namespace *from, gid_t gid)
^
fs/affs/super.c:267:11: warning: passing argument 1 of 'make_kuid' makes pointer from integer without a cast
*uid = make_kuid(current_user_ns(), option);
^
In file included from include/linux/stat.h:19:0,
from include/linux/module.h:10,
from fs/affs/super.c:13:
include/linux/uidgid.h:142:22: note: expected 'struct user_namespace *' but argument is of type 'int'
static inline kuid_t make_kuid(struct user_namespace *from, uid_t uid)
^
cc1: some warnings being treated as errors
--
fs/hfsplus/inode.c: In function 'hfsplus_new_inode':
fs/hfsplus/inode.c:366:2: error: implicit declaration of function 'current_fsuid' [-Werror=implicit-function-declaration]
inode->i_uid = current_fsuid();
^
>> fs/hfsplus/inode.c:366:15: error: incompatible types when assigning to type 'kuid_t' from type 'int'
inode->i_uid = current_fsuid();
^
fs/hfsplus/inode.c:367:2: error: implicit declaration of function 'current_fsgid' [-Werror=implicit-function-declaration]
inode->i_gid = current_fsgid();
^
>> fs/hfsplus/inode.c:367:15: error: incompatible types when assigning to type 'kgid_t' from type 'int'
inode->i_gid = current_fsgid();
^
cc1: some warnings being treated as errors
--
fs/omfs/inode.c: In function 'parse_options':
fs/omfs/inode.c:394:4: error: implicit declaration of function 'current_user_ns' [-Werror=implicit-function-declaration]
sbi->s_uid = make_kuid(current_user_ns(), option);
^
fs/omfs/inode.c:394:17: warning: passing argument 1 of 'make_kuid' makes pointer from integer without a cast
sbi->s_uid = make_kuid(current_user_ns(), option);
^
In file included from include/linux/stat.h:19:0,
from include/linux/module.h:10,
from fs/omfs/inode.c:6:
include/linux/uidgid.h:142:22: note: expected 'struct user_namespace *' but argument is of type 'int'
static inline kuid_t make_kuid(struct user_namespace *from, uid_t uid)
^
fs/omfs/inode.c:401:17: warning: passing argument 1 of 'make_kgid' makes pointer from integer without a cast
sbi->s_gid = make_kgid(current_user_ns(), option);
^
In file included from include/linux/stat.h:19:0,
from include/linux/module.h:10,
from fs/omfs/inode.c:6:
include/linux/uidgid.h:147:22: note: expected 'struct user_namespace *' but argument is of type 'int'
static inline kgid_t make_kgid(struct user_namespace *from, gid_t gid)
^
fs/omfs/inode.c: In function 'omfs_fill_super':
fs/omfs/inode.c:444:2: error: implicit declaration of function 'current_uid' [-Werror=implicit-function-declaration]
sbi->s_uid = current_uid();
^
>> fs/omfs/inode.c:444:13: error: incompatible types when assigning to type 'kuid_t' from type 'int'
sbi->s_uid = current_uid();
^
fs/omfs/inode.c:445:2: error: implicit declaration of function 'current_gid' [-Werror=implicit-function-declaration]
sbi->s_gid = current_gid();
^
>> fs/omfs/inode.c:445:13: error: incompatible types when assigning to type 'kgid_t' from type 'int'
sbi->s_gid = current_gid();
^
cc1: some warnings being treated as errors

vim +199 fs/affs/super.c

^1da177e Linus Torvalds 2005-04-16 193 {
^1da177e Linus Torvalds 2005-04-16 194 char *p;
^1da177e Linus Torvalds 2005-04-16 195 substring_t args[MAX_OPT_ARGS];
^1da177e Linus Torvalds 2005-04-16 196
^1da177e Linus Torvalds 2005-04-16 197 /* Fill in defaults */
^1da177e Linus Torvalds 2005-04-16 198
21559981 David Howells 2008-11-14 @199 *uid = current_uid();
21559981 David Howells 2008-11-14 @200 *gid = current_gid();
^1da177e Linus Torvalds 2005-04-16 201 *reserved = 2;
^1da177e Linus Torvalds 2005-04-16 202 *root = -1;
^1da177e Linus Torvalds 2005-04-16 203 *blocksize = -1;

:::::: The code at line 199 was first introduced by commit
:::::: 215599815d8977a4338fbd27d6fe2c1721200197 CRED: Wrap task credential accesses in the AFFS filesystem

:::::: TO: David Howells <dhowells@xxxxxxxxxx>
:::::: CC: James Morris <jmorris@xxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip