lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09cd08cf-9c6b-4c5f-b0da-e9a74ef120a5@huawei.com>
Date: Fri, 6 Dec 2024 10:28:48 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Jakub Kicinski <kuba@...nel.org>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>
CC: <shaojijie@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<pabeni@...hat.com>, <andrew+netdev@...n.ch>, <horms@...nel.org>,
	<shenjian15@...wei.com>, <wangpeiyang1@...wei.com>, <liuyonglong@...wei.com>,
	<chenhao418@...wei.com>, <sudongming1@...wei.com>, <xujunsheng@...wei.com>,
	<shiyongbang@...wei.com>, <libaihan@...wei.com>,
	<jonathan.cameron@...wei.com>, <shameerali.kolothum.thodi@...wei.com>,
	<salil.mehta@...wei.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <hkelam@...vell.com>
Subject: Re: [PATCH V4 RESEND net-next 1/7] net: hibmcge: Add debugfs
 supported in this module


on 2024/12/6 9:50, Jakub Kicinski wrote:
> On Tue, 3 Dec 2024 23:01:25 +0800 Jijie Shao wrote:
>> +static void hbg_debugfs_uninit(void *data)
>> +{
>> +	debugfs_remove_recursive((struct dentry *)data);
>> +}
>> +
>> +void hbg_debugfs_init(struct hbg_priv *priv)
>> +{
>> +	const char *name = pci_name(priv->pdev);
>> +	struct device *dev = &priv->pdev->dev;
>> +	struct dentry *root;
>> +	u32 i;
>> +
>> +	root = debugfs_create_dir(name, hbg_dbgfs_root);
>> +
>> +	for (i = 0; i < ARRAY_SIZE(hbg_dbg_infos); i++)
>> +		debugfs_create_devm_seqfile(dev, hbg_dbg_infos[i].name,
>> +					    root, hbg_dbg_infos[i].read);
>> +
>> +	/* Ignore the failure because debugfs is not a key feature. */
>> +	devm_add_action_or_reset(dev, hbg_debugfs_uninit, root);
> There is nothing specific to this driver in the devm action,
> also no need to create all files as devm if you remove recursive..
>
> Hi Greg, are you okay with adding debugfs_create_devm_dir() ?

Of course, it's my pleasure. I will add a patch in V5 to try to add this interface.

Thanks,
Jijie Shao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ