[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ad91a67e-40af-fcab-8521-7d2174c6c1f4@huawei.com>
Date: Thu, 10 Aug 2023 16:06:24 +0800
From: shaozhengchao <shaozhengchao@...wei.com>
To: Hangbin Liu <liuhangbin@...il.com>
CC: <netdev@...r.kernel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <j.vosburgh@...il.com>,
<andy@...yhouse.net>, <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>
Subject: Re: [PATCH net-next 2/5] bonding: remove warning printing in
bond_create_debugfs
On 2023/8/10 10:53, Hangbin Liu wrote:
> On Wed, Aug 09, 2023 at 08:41:04PM +0800, Zhengchao Shao wrote:
>> Because debugfs_create_dir returns ERR_PTR, so warning printing will never
>> be invoked in bond_create_debugfs, remove it. If failed to create
>> directory, failure information will be printed in debugfs_create_dir.
>>
>> Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
>> ---
>> drivers/net/bonding/bond_debugfs.c | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/net/bonding/bond_debugfs.c b/drivers/net/bonding/bond_debugfs.c
>> index 94c2f35e3bfc..e4e7f4ee48e0 100644
>> --- a/drivers/net/bonding/bond_debugfs.c
>> +++ b/drivers/net/bonding/bond_debugfs.c
>> @@ -87,9 +87,6 @@ void bond_debug_reregister(struct bonding *bond)
>> void __init bond_create_debugfs(void)
>> {
>> bonding_debug_root = debugfs_create_dir("bonding", NULL);
>> -
>> - if (!bonding_debug_root)
>
Hi Hangbin:
> debugfs_create_dir() does not print information for all failures. We can use
> IS_ERR(bonding_debug_root) to check the value here.
>
Thank you for your review. I think you are right here, and I
will modify it.
Zhengchao Shao
> Thanks
> Hangbin
>> - pr_warn("Warning: Cannot create bonding directory in debugfs\n");
>> }
>>
>> void bond_destroy_debugfs(void)
>> --
>> 2.34.1
>>
Powered by blists - more mailing lists