[patch] sfc: cleanup a condition in efx_udp_tunnel_del()

Subsystems: networking drivers, sfc network driver, the rest

STALE3418d

3 messages, 3 authors, 2017-03-23 · open the first message on its own page

[patch] sfc: cleanup a condition in efx_udp_tunnel_del()

From: Dan Carpenter <hidden>
Date: 2017-03-22 09:10:02

Presumably if there is an "add" function, there is also a "del"
function.  But it causes a static checker warning because it looks like
a common cut and paste bug.

Signed-off-by: Dan Carpenter <redacted>
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 8c4c273643dc..203c8c3752e7 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2404,7 +2404,7 @@ static void efx_udp_tunnel_del(struct net_device *dev, struct udp_tunnel_info *t
 	tnl.type = (u16)efx_tunnel_type;
 	tnl.port = ti->port;
 
-	if (efx->type->udp_tnl_add_port)
+	if (efx->type->udp_tnl_del_port)
 		(void)efx->type->udp_tnl_del_port(efx, tnl);
 }
 

Re: [patch] sfc: cleanup a condition in efx_udp_tunnel_del()

From: Jarod Wilson <hidden>
Date: 2017-03-22 21:41:16

On 2017-03-22 5:10 AM, Dan Carpenter wrote:
Presumably if there is an "add" function, there is also a "del"
function.  But it causes a static checker warning because it looks like
a common cut and paste bug.

Signed-off-by: Dan Carpenter <redacted>
Agreed, looks like a cut-n-paste buglet.

Acked-by: Jarod Wilson <redacted>

-- 
Jarod Wilson
jarod@redhat.com

Re: [patch] sfc: cleanup a condition in efx_udp_tunnel_del()

From: David Miller <davem@davemloft.net>
Date: 2017-03-23 02:26:11

From: Dan Carpenter <redacted>
Date: Wed, 22 Mar 2017 12:10:02 +0300
Presumably if there is an "add" function, there is also a "del"
function.  But it causes a static checker warning because it looks like
a common cut and paste bug.

Signed-off-by: Dan Carpenter <redacted>
Looks good, applied, thanks Dan.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help