diff mbox series

[net-next] bonding: delete always true device check

Message ID 0b2f8f5f09701bb43bbd83b94bfe5cb506b57adc.1738587150.git.leon@kernel.org (mailing list archive)
State Accepted
Commit 546d98393abcf2f841e61163d95ed21fde346cc1
Delegated to: Netdev Maintainers
Headers show
Series [net-next] bonding: delete always true device check | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
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: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 2 this patch: 2
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 Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 13 this patch: 13
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-02-04--00-00 (tests: 886)

Commit Message

Leon Romanovsky Feb. 3, 2025, 12:59 p.m. UTC
From: Leon Romanovsky <leonro@nvidia.com>

XFRM API makes sure that xs->xso.dev is valid in all XFRM offload
callbacks. There is no need to check it again.

Fixes: 1ddec5d0eec4 ("bonding: add common function to check ipsec device")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
There is nothing urgent in this change, it can go to net-next too.
---
 drivers/net/bonding/bond_main.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Paolo Abeni Feb. 4, 2025, 12:49 p.m. UTC | #1
On 2/3/25 1:59 PM, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> XFRM API makes sure that xs->xso.dev is valid in all XFRM offload
> callbacks. There is no need to check it again.
> 
> Fixes: 1ddec5d0eec4 ("bonding: add common function to check ipsec device")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>

Acked-by: Paolo Abeni <pabeni@redhat.com>
Nikolay Aleksandrov Feb. 4, 2025, 4:38 p.m. UTC | #2
On 2/3/25 14:59, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> XFRM API makes sure that xs->xso.dev is valid in all XFRM offload
> callbacks. There is no need to check it again.
> 
> Fixes: 1ddec5d0eec4 ("bonding: add common function to check ipsec device")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> There is nothing urgent in this change, it can go to net-next too.
> ---
>  drivers/net/bonding/bond_main.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index bfb55c23380b..154e670d8075 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -432,9 +432,6 @@ static struct net_device *bond_ipsec_dev(struct xfrm_state *xs)
>  	struct bonding *bond;
>  	struct slave *slave;
>  
> -	if (!bond_dev)
> -		return NULL;
> -
>  	bond = netdev_priv(bond_dev);
>  	if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)
>  		return NULL;

Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
patchwork-bot+netdevbpf@kernel.org Feb. 4, 2025, 10:20 p.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon,  3 Feb 2025 14:59:23 +0200 you wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> XFRM API makes sure that xs->xso.dev is valid in all XFRM offload
> callbacks. There is no need to check it again.
> 
> Fixes: 1ddec5d0eec4 ("bonding: add common function to check ipsec device")
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> 
> [...]

Here is the summary with links:
  - [net-next] bonding: delete always true device check
    https://git.kernel.org/netdev/net-next/c/546d98393abc

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 bfb55c23380b..154e670d8075 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -432,9 +432,6 @@  static struct net_device *bond_ipsec_dev(struct xfrm_state *xs)
 	struct bonding *bond;
 	struct slave *slave;
 
-	if (!bond_dev)
-		return NULL;
-
 	bond = netdev_priv(bond_dev);
 	if (BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)
 		return NULL;