Skip to contentSkip to conversation

rocker: Simplify if condition in ofdpa_port_fdb()

PATCH Applied Thorsten Blum 3 participants 3 messages Apr 7, 2025 – Apr 8, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rocker: Simplify if condition in ofdpa_port_fdb()

Remove the double negation and simplify the if condition.

No functional changes intended.

---
 drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/rocker/rocker_ofdpa.c +1 -1
index 826990459fa4..8832bfdd8833 100644
@@ -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;
#2 lore raw
In reply to Thorsten Blum
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.

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