Thread (15 messages) 15 messages, 3 authors, 2024-12-09

Re: [PATCH V5 net-next 1/8] debugfs: Add debugfs_create_devm_dir() helper

From: kernel test robot <hidden>
Date: 2024-12-06 14:57:30
Also in: lkml, llvm, oe-kbuild-all

Hi Jijie,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Jijie-Shao/debugfs-Add-debugfs_create_devm_dir-helper/20241206-192734
base:   net-next/main
patch link:    https://lore.kernel.org/r/20241206111629.3521865-2-shaojijie%40huawei.com
patch subject: [PATCH V5 net-next 1/8] debugfs: Add debugfs_create_devm_dir() helper
config: powerpc-ebony_defconfig (https://download.01.org/0day-ci/archive/20241206/202412062221.GPVtNG5v-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241206/202412062221.GPVtNG5v-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 [off-list ref]
| Closes: https://lore.kernel.org/oe-kbuild-all/202412062221.GPVtNG5v-lkp@intel.com/ (local)

All warnings (new ones prefixed by >>):
quoted
fs/debugfs/inode.c:643:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
     643 |                 ERR_PTR(ret);
         |                 ^~~~~~~ ~~~
   1 warning generated.


vim +/warn_unused_result +643 fs/debugfs/inode.c

   619	
   620	/**
   621	 * debugfs_create_devm_dir - Managed debugfs_create_dir()
   622	 * @dev: Device that owns the action
   623	 * @name: a pointer to a string containing the name of the directory to
   624	 *        create.
   625	 * @parent: a pointer to the parent dentry for this file.  This should be a
   626	 *          directory dentry if set.  If this parameter is NULL, then the
   627	 *          directory will be created in the root of the debugfs filesystem.
   628	 * Managed debugfs_create_dir(). dentry will automatically be remove on
   629	 * driver detach.
   630	 */
   631	struct dentry *debugfs_create_devm_dir(struct device *dev, const char *name,
   632					       struct dentry *parent)
   633	{
   634		struct dentry *dentry;
   635		int ret;
   636	
   637		dentry = debugfs_create_dir(name, parent);
   638		if (IS_ERR(dentry))
   639			return dentry;
   640	
   641		ret = devm_add_action_or_reset(dev, debugfs_remove_devm, dentry);
   642		if (ret)
 > 643			ERR_PTR(ret);
   644	
   645		return dentry;
   646	}
   647	EXPORT_SYMBOL_GPL(debugfs_create_devm_dir);
   648	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help