Re: [PATCH V5 net-next 1/8] debugfs: Add debugfs_create_devm_dir() helper
From: kernel test robot <hidden>
Date: 2024-12-06 16:51:00
Also in:
lkml, 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: x86_64-buildonly-randconfig-003-20241206 (https://download.01.org/0day-ci/archive/20241207/202412070055.uUO1oKY8-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241207/202412070055.uUO1oKY8-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/202412070055.uUO1oKY8-lkp@intel.com/ (local) All warnings (new ones prefixed by >>): fs/debugfs/inode.c: In function 'debugfs_create_devm_dir':
quoted
fs/debugfs/inode.c:643:17: warning: ignoring return value of 'ERR_PTR' declared with attribute 'warn_unused_result' [-Wunused-result]
643 | ERR_PTR(ret);
| ^~~~~~~~~~~~
vim +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