public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [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
@ 2026-04-09  1:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-09  1:09 UTC (permalink / raw)
  To: Christian Brauner; +Cc: llvm, oe-kbuild-all, Christian Brauner

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-09  1:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09  1:09 [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 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