netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] rocker: Simplify if condition in ofdpa_port_fdb()
@ 2025-04-07  9:14 Thorsten Blum
  2025-04-07 10:23 ` Jiri Pirko
  2025-04-08 11:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-04-07  9:14 UTC (permalink / raw)
  To: Jiri Pirko, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Thorsten Blum, netdev, linux-kernel

Remove the double negation and simplify the if condition.

No functional changes intended.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 drivers/net/ethernet/rocker/rocker_ofdpa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/rocker/rocker_ofdpa.c b/drivers/net/ethernet/rocker/rocker_ofdpa.c
index 826990459fa4..8832bfdd8833 100644
--- a/drivers/net/ethernet/rocker/rocker_ofdpa.c
+++ b/drivers/net/ethernet/rocker/rocker_ofdpa.c
@@ -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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] rocker: Simplify if condition in ofdpa_port_fdb()
  2025-04-07  9:14 [PATCH net-next] rocker: Simplify if condition in ofdpa_port_fdb() Thorsten Blum
@ 2025-04-07 10:23 ` Jiri Pirko
  2025-04-08 11:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2025-04-07 10:23 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel

Mon, Apr 07, 2025 at 11:14:42AM +0200, thorsten.blum@linux.dev wrote:
>Remove the double negation and simplify the if condition.
>
>No functional changes intended.
>
>Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Why not.

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] rocker: Simplify if condition in ofdpa_port_fdb()
  2025-04-07  9:14 [PATCH net-next] rocker: Simplify if condition in ofdpa_port_fdb() Thorsten Blum
  2025-04-07 10:23 ` Jiri Pirko
@ 2025-04-08 11:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-04-08 11:20 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: jiri, andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

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 <thorsten.blum@linux.dev>
> ---
>  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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-04-08 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-07  9:14 [PATCH net-next] rocker: Simplify if condition in ofdpa_port_fdb() Thorsten Blum
2025-04-07 10:23 ` Jiri Pirko
2025-04-08 11:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).