* [ammarfaizi2-block:viro/vfs/work.fd 7/8] kernel/cgroup/cgroup.c:6861:13: error: incompatible types when assigning to type 'struct fd *' from type 'struct fd'
@ 2023-03-07 13:14 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-03-07 13:14 UTC (permalink / raw)
To: Al Viro; +Cc: oe-kbuild-all, Ammar Faizi, GNU/Weeb Mailing List
tree: https://github.com/ammarfaizi2/linux-block viro/vfs/work.fd
head: 792be394ebd3f30e973319f4a8019c294ca02ce2
commit: 96416baecdcc05aa7bfe16986dd9955e613ed808 [7/8] cgroup_get_from_fd(): switch to fdget_raw()
config: riscv-buildonly-randconfig-r006-20230305 (https://download.01.org/0day-ci/archive/20230307/[email protected]/config)
compiler: riscv32-linux-gcc (GCC) 12.1.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://github.com/ammarfaizi2/linux-block/commit/96416baecdcc05aa7bfe16986dd9955e613ed808
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block viro/vfs/work.fd
git checkout 96416baecdcc05aa7bfe16986dd9955e613ed808
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash kernel/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
kernel/cgroup/cgroup.c: In function 'cgroup_v1v2_get_from_fd':
>> kernel/cgroup/cgroup.c:6861:13: error: incompatible types when assigning to type 'struct fd *' from type 'struct fd'
6861 | f = fdget_raw(fd);
| ^~~~~~~~~
>> kernel/cgroup/cgroup.c:6862:15: error: 'f' is a pointer; did you mean to use '->'?
6862 | if (!f.file)
| ^
| ->
kernel/cgroup/cgroup.c:6865:43: error: 'f' is a pointer; did you mean to use '->'?
6865 | cgrp = cgroup_v1v2_get_from_file(f.file);
| ^
| ->
>> kernel/cgroup/cgroup.c:6866:15: error: incompatible type for argument 1 of 'fdput'
6866 | fdput(f);
| ^
| |
| struct fd *
In file included from include/linux/kernel_read_file.h:5,
from include/linux/security.h:26,
from include/linux/fs_context.h:14,
from include/linux/fs_parser.h:11,
from kernel/cgroup/cgroup-internal.h:10,
from kernel/cgroup/cgroup.c:31:
include/linux/file.h:42:36: note: expected 'struct fd' but argument is of type 'struct fd *'
42 | static inline void fdput(struct fd fd)
| ~~~~~~~~~~^~
vim +6861 kernel/cgroup/cgroup.c
6846
6847 /**
6848 * cgroup_v1v2_get_from_fd - get a cgroup pointer from a fd
6849 * @fd: fd obtained by open(cgroup_dir)
6850 *
6851 * Find the cgroup from a fd which should be obtained
6852 * by opening a cgroup directory. Returns a pointer to the
6853 * cgroup on success. ERR_PTR is returned if the cgroup
6854 * cannot be found.
6855 */
6856 struct cgroup *cgroup_v1v2_get_from_fd(int fd)
6857 {
6858 struct cgroup *cgrp;
6859 struct fd *f;
6860
> 6861 f = fdget_raw(fd);
> 6862 if (!f.file)
6863 return ERR_PTR(-EBADF);
6864
6865 cgrp = cgroup_v1v2_get_from_file(f.file);
> 6866 fdput(f);
6867 return cgrp;
6868 }
6869
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-07 13:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-07 13:14 [ammarfaizi2-block:viro/vfs/work.fd 7/8] kernel/cgroup/cgroup.c:6861:13: error: incompatible types when assigning to type 'struct fd *' from type 'struct fd' 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