diff mbox series

[net-next] bonding: remove print in bond_verify_device_path

Message ID 20231123015515.3318350-1-shaozhengchao@huawei.com (mailing list archive)
State Accepted
Commit 486058f42a4728053ae69ebbf78e9731d8ce6f8b
Delegated to: Netdev Maintainers
Headers show
Series [net-next] bonding: remove print in bond_verify_device_path | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/codegen success Generated files up to date
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1127 this patch: 1127
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 1154 this patch: 1154
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1154 this patch: 1154
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 12 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

shaozhengchao Nov. 23, 2023, 1:55 a.m. UTC
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(-)

Comments

Hangbin Liu Nov. 23, 2023, 2:13 a.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org Nov. 24, 2023, 3:30 p.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 23 Nov 2023 09:55:15 +0800 you 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>
> 
> [...]

Here is the summary with links:
  - [net-next] bonding: remove print in bond_verify_device_path
    https://git.kernel.org/netdev/net-next/c/486058f42a47

You are awesome, thank you!
diff mbox series

Patch

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;
 	}