GNU/Weeb Mailing List <[email protected]>
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: Al Viro <[email protected]>
Cc: [email protected],
	Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: [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'
Date: Tue, 7 Mar 2023 21:14:16 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

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

                 reply	other threads:[~2023-03-07 13:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox