All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Richard Weinberger <richard@nod.at>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [rw-misc:muse-wip 8/9] drivers/mtd/muse.c:1001:6: error: dereferencing pointer to incomplete type 'struct file'
Date: Sun, 29 Nov 2026 02:40:37 +0100	[thread overview]
Message-ID: <20261129023822.M4AIMQAp-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rw/misc.git muse-wip
head:   77047033a75a5bf807b2376d08edd9ce12ed67ec
commit: c1a3aa10457c384873e85a0f50cb8a5065689c3a [8/9] mtd: Implement MUSE - MTD in userspace
config: arc-randconfig-2002-20261129 (https://download.01.org/0day-ci/archive/20261129/20261129023822.M4AIMQAp-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261129/20261129023822.M4AIMQAp-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261129023822.M4AIMQAp-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/mtd/muse.c: In function 'muse_process_init_reply':
   drivers/mtd/muse.c:892:16: error: implicit declaration of function 'task_tgid_vnr' [-Werror=implicit-function-declaration]
     mc->creator = task_tgid_vnr(current);
                   ^~~~~~~~~~~~~
   drivers/mtd/muse.c: In function 'muse_ctrl_open':
   drivers/mtd/muse.c:972:7: error: implicit declaration of function 'capable'; did you mean 'PageTable'? [-Werror=implicit-function-declaration]
     if (!capable(CAP_SYS_ADMIN))
          ^~~~~~~
          PageTable
   drivers/mtd/muse.c:972:15: error: 'CAP_SYS_ADMIN' undeclared (first use in this function)
     if (!capable(CAP_SYS_ADMIN))
                  ^~~~~~~~~~~~~
   drivers/mtd/muse.c:972:15: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/mtd/muse.c:1001:6: error: dereferencing pointer to incomplete type 'struct file'
     file->private_data = fud;
         ^~
   drivers/mtd/muse.c: In function 'muse_init':
   drivers/mtd/muse.c:1049:17: error: 'muse_ctrl_fops' has an incomplete type 'struct file_operations'
     muse_ctrl_fops = fuse_dev_operations;
                    ^
   drivers/mtd/muse.c:1050:16: error: invalid use of undefined type 'struct file_operations'
     muse_ctrl_fops.owner = THIS_MODULE;
                   ^
   drivers/mtd/muse.c:1051:16: error: invalid use of undefined type 'struct file_operations'
     muse_ctrl_fops.open = muse_ctrl_open;
                   ^
   drivers/mtd/muse.c:1052:16: error: invalid use of undefined type 'struct file_operations'
     muse_ctrl_fops.release = muse_ctrl_release;
                   ^
   drivers/mtd/muse.c:1054:16: error: invalid use of undefined type 'struct file_operations'
     muse_ctrl_fops.unlocked_ioctl = NULL;
                   ^
   drivers/mtd/muse.c: At top level:
   drivers/mtd/muse.c:1036:31: error: storage size of 'muse_ctrl_fops' isn't known
    static struct file_operations muse_ctrl_fops;
                                  ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +1001 drivers/mtd/muse.c

   962	
   963	static int muse_ctrl_open(struct inode *inode, struct file *file)
   964	{
   965		struct muse_conn *mc;
   966		struct fuse_dev *fud;
   967		int ret;
   968	
   969		/*
   970		 * Paranoia check.
   971		 */
 > 972		if (!capable(CAP_SYS_ADMIN))
   973			return -EPERM;
   974	
   975		mc = kzalloc(sizeof(*mc), GFP_KERNEL);
   976		if (!mc)
   977			return -ENOMEM;
   978	
   979		mutex_init(&mc->ref_mutex);
   980	
   981		mc->fc = fuse_conn_new_dev(&init_user_ns, muse_conn_release, mc);
   982		if (!mc->fc) {
   983			kfree(mc);
   984			return -ENOMEM;
   985		}
   986	
   987		/*
   988		 * From now on mc is freed via muse_conn_release() as soon the last
   989		 * reference on the connection is gone.
   990		 */
   991		fud = fuse_conn_install_dev(mc->fc);
   992		if (!fud) {
   993			ret = -ENOMEM;
   994			goto err_conn;
   995		}
   996	
   997		ret = muse_send_init(mc);
   998		if (ret)
   999			goto err_dev;
  1000	
> 1001		file->private_data = fud;
  1002	
  1003		return 0;
  1004	
  1005	err_dev:
  1006		fuse_dev_put(fud);
  1007	err_conn:
  1008		fuse_conn_put(mc->fc);
  1009		return ret;
  1010	}
  1011	

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

                 reply	other threads:[~2026-11-29  1:41 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 \
    --in-reply-to=20261129023822.M4AIMQAp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=richard@nod.at \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.