public inbox for netdev@vger.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] bonding: remove print in bond_verify_device_path
Date: Thu, 23 Nov 2023 10:13:27 +0800	[thread overview]
Message-ID: <ZV61R5OjWW+lbZ/O@Laptop-X1> (raw)
In-Reply-To: <20231123015515.3318350-1-shaozhengchao@huawei.com>

On Thu, Nov 23, 2023 at 09:55:15AM +0800, Zhengchao Shao wrote:
> As suggested by Paolo in link[1], if the memory allocation fails, the mm
> layer will emit a lot warning comprising the backtrace, so remove the
> print.
> 
> [1] https://lore.kernel.org/all/20231118081653.1481260-1-shaozhengchao@huawei.com/
> 
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> ---
>  drivers/net/bonding/bond_main.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index d987432cee3b..4e0600c7b050 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2973,11 +2973,8 @@ struct bond_vlan_tag *bond_verify_device_path(struct net_device *start_dev,
>  
>  	if (start_dev == end_dev) {
>  		tags = kcalloc(level + 1, sizeof(*tags), GFP_ATOMIC);
> -		if (!tags) {
> -			net_err_ratelimited("%s: %s: Failed to allocate tags\n",
> -					    __func__, start_dev->name);
> +		if (!tags)
>  			return ERR_PTR(-ENOMEM);
> -		}
>  		tags[level].vlan_proto = BOND_VLAN_PROTO_NONE;
>  		return tags;
>  	}
> -- 
> 2.34.1
> 

Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>

  reply	other threads:[~2023-11-23  2:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-23  1:55 [PATCH net-next] bonding: remove print in bond_verify_device_path Zhengchao Shao
2023-11-23  2:13 ` Hangbin Liu [this message]
2023-11-24 15:30 ` patchwork-bot+netdevbpf

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=ZV61R5OjWW+lbZ/O@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox