rocker: Simplify if condition in ofdpa_port_fdb()
Subsystems (3)
PATCH 1/1 rocker: Simplify if condition in ofdpa_port_fdb()
Remove the double negation and simplify the if condition.
No functional changes intended.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/rocker/rocker_ofdpa.c +1 -1
@@ -1933,7 +1933,7 @@ static int ofdpa_port_fdb(struct ofdpa_port *ofdpa_port,spin_unlock_irqrestore (&ofdpa->fdb_tbl_lock, lock_flags);/* Check if adding and already exists, or removing and can't find */ -if (!found != !removing) { +if (!found == removing) {kfree (fdb);if (!found && removing)return 0 ;
Quoted 5 lines · Mon, Apr 07, 2025 at 11:14:42AM +0200, [email protected] wrote:
Remove the double negation and simplify the if condition.
No functional changes intended.
Signed-off-by Thorsten Blum <[email protected]>
Why not.
Reviewed-by Jiri Pirko <[email protected]>
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Mon, 7 Apr 2025 11:14:42 +0200 you wrote:
Remove the double negation and simplify the if condition.
No functional changes intended.
Signed-off-by Thorsten Blum <[email protected]>--- drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [net-next] rocker: Simplify if condition in ofdpa_port_fdb()
https://git.kernel.org/netdev/net-next/c/4acdd3de31c8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html