public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Christian Brauner <christianvanbrauner@gmail.com>
Subject: [brauner-github:vfs.fixes 3/5] fs/sysfs/mount.c:75:23: error: call to undeclared function 'to_net_ns'; ISO C99 and later do not support implicit function declarations
Date: Thu, 09 Apr 2026 03:09:28 +0200	[thread overview]
Message-ID: <202604090340.OgYnFPAR-lkp@intel.com> (raw)

tree:   https://github.com/brauner/linux.git vfs.fixes
head:   98d1a51c628ef056c2d5a06d39c2d5b38aff9237
commit: 9a8098b1d5023ca94d91ce9b7c3dbf762fe3b3fb [3/5] kernfs: pass struct ns_common instead of const void * for namespace tags
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260409/202604090340.OgYnFPAR-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260409/202604090340.OgYnFPAR-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/202604090340.OgYnFPAR-lkp@intel.com/

All errors (new ones prefixed by >>):

>> fs/sysfs/mount.c:75:23: error: call to undeclared function 'to_net_ns'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      75 |                 struct net *netns = to_net_ns(ns);
         |                                     ^
>> fs/sysfs/mount.c:75:15: error: incompatible integer to pointer conversion initializing 'struct net *' with an expression of type 'int' [-Wint-conversion]
      75 |                 struct net *netns = to_net_ns(ns);
         |                             ^       ~~~~~~~~~~~~~
   2 errors generated.


vim +/to_net_ns +75 fs/sysfs/mount.c

    54	
    55	static int sysfs_init_fs_context(struct fs_context *fc)
    56	{
    57		struct kernfs_fs_context *kfc;
    58		struct ns_common *ns;
    59	
    60		if (!(fc->sb_flags & SB_KERNMOUNT)) {
    61			if (!kobj_ns_current_may_mount(KOBJ_NS_TYPE_NET))
    62				return -EPERM;
    63		}
    64	
    65		kfc = kzalloc_obj(struct kernfs_fs_context);
    66		if (!kfc)
    67			return -ENOMEM;
    68	
    69		kfc->ns_tag = ns = kobj_ns_grab_current(KOBJ_NS_TYPE_NET);
    70		kfc->root = sysfs_root;
    71		kfc->magic = SYSFS_MAGIC;
    72		fc->fs_private = kfc;
    73		fc->ops = &sysfs_fs_context_ops;
    74		if (ns) {
  > 75			struct net *netns = to_net_ns(ns);
    76	
    77			put_user_ns(fc->user_ns);
    78			fc->user_ns = get_user_ns(netns->user_ns);
    79		}
    80		fc->global = true;
    81		return 0;
    82	}
    83	

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

                 reply	other threads:[~2026-04-09  1:09 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=202604090340.OgYnFPAR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brauner@kernel.org \
    --cc=christianvanbrauner@gmail.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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