All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, j.vosburgh@gmail.com,
	andy@greyhouse.net, weiyongjun1@huawei.com,
	yuehaibing@huawei.com
Subject: Re: [PATCH net-next 2/5] bonding: remove warning printing in bond_create_debugfs
Date: Thu, 10 Aug 2023 10:53:10 +0800	[thread overview]
Message-ID: <ZNRRFny6lQmRYd+F@Laptop-X1> (raw)
In-Reply-To: <20230809124107.360574-3-shaozhengchao@huawei.com>

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@huawei.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)

debugfs_create_dir() does not print information for all failures. We can use
IS_ERR(bonding_debug_root) to check the value here.

Thanks
Hangbin
> -		pr_warn("Warning: Cannot create bonding directory in debugfs\n");
>  }
>  
>  void bond_destroy_debugfs(void)
> -- 
> 2.34.1
> 

  reply	other threads:[~2023-08-10  2:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-09 12:41 [PATCH net-next 0/5] bonding: do some cleanups in bond driver Zhengchao Shao
2023-08-09 12:41 ` [PATCH net-next 1/5] bonding: add modifier to initialization function and exit function Zhengchao Shao
2023-08-13  7:57   ` Leon Romanovsky
2023-08-09 12:41 ` [PATCH net-next 2/5] bonding: remove warning printing in bond_create_debugfs Zhengchao Shao
2023-08-10  2:53   ` Hangbin Liu [this message]
2023-08-10  8:06     ` shaozhengchao
2023-08-09 12:41 ` [PATCH net-next 3/5] bonding: remove unnecessary NULL check in debugfs function Zhengchao Shao
2023-08-09 16:13   ` Jay Vosburgh
2023-08-10  3:08     ` Hangbin Liu
2023-08-10  8:08       ` shaozhengchao
2023-08-09 12:41 ` [PATCH net-next 4/5] bonding: use bond_set_slave_arr to simplify code Zhengchao Shao
2023-08-10  0:17   ` Vadim Fedorenko
2023-08-10  8:10     ` shaozhengchao
2023-08-09 12:41 ` [PATCH net-next 5/5] bonding: remove unnecessary NULL check in bond_destructor Zhengchao Shao
2023-08-13  7:58   ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZNRRFny6lQmRYd+F@Laptop-X1 \
    --to=liuhangbin@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=j.vosburgh@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaozhengchao@huawei.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.