Skip to contentSkip to conversation

staging: fsl-dpaa2: ethsw: Remove return variable

PATCH In review Nishka Dasgupta 2 participants 3 messages Mar 19, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fsl-dpaa2: ethsw: Remove return variable

Remove return variable and return return value directly. Issue found by Coccinelle using ret.cocci.

---
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/fsl-dpaa2/ethsw/ethsw.c +1 -3
index ad577beeb052..e3c3e427309a 100644
@@ -1350,9 +1350,7 @@ static int ethsw_port_init(struct ethsw_port_priv *port_priv, u16 port)
 		return err;
 	}
 
-	err = ethsw_port_fdb_add_mc(port_priv, def_mcast);
-
-	return err;
+	return ethsw_port_fdb_add_mc(port_priv, def_mcast);
 }
 
 static void ethsw_unregister_notifier(struct device *dev)
Signature · 1 line
2.19.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Nishka Dasgupta' via outreachy-kernel

Remove return variable and return return value directly. Issue found by Coccinelle using ret.cocci.

Quoted 29 lines
---
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/fsl-dpaa2/ethsw/ethsw.c +1 -4
index ad577beeb052..e3c3e427309a 100644
@@ -1350,9 +1350,7 @@ static int ethsw_port_init(struct ethsw_port_priv *port_priv, u16 port)
 		return err;
 	}
 
-	err = ethsw_port_fdb_add_mc(port_priv, def_mcast);
-
-	return err;
+	return ethsw_port_fdb_add_mc(port_priv, def_mcast);
 }
 
 static void ethsw_unregister_notifier(struct device *dev)
--

2.19.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190319192231.8422-1-nishka.dasgupta%40yahoo.com.
For more options, visit https://groups.google.com/d/optout.

#2 lore raw
In reply to Nishka Dasgupta

Hello,

I think this patch was sent to too many people. You should include the following arguments when you run checkpatch, to just get the maintainers:

--nokeywords --nogit --nogit-fallback --norolestats --nol

julia

Quoted 33 lines · Nishka Dasgupta' via outreachy-kernel

Remove return variable and return return value directly. Issue found by Coccinelle using ret.cocci.

---
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/fsl-dpaa2/ethsw/ethsw.c +1 -4
index ad577beeb052..e3c3e427309a 100644
@@ -1350,9 +1350,7 @@ static int ethsw_port_init(struct ethsw_port_priv *port_priv, u16 port)
 		return err;
 	}
 
-	err = ethsw_port_fdb_add_mc(port_priv, def_mcast);
-
-	return err;
+	return ethsw_port_fdb_add_mc(port_priv, def_mcast);
 }
 
 static void ethsw_unregister_notifier(struct device *dev)
--

2.19.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190319192231.8422-1-nishka.dasgupta%40yahoo.com.
For more options, visit https://groups.google.com/d/optout.