All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value
@ 2016-09-23 19:45 Georgiana Rodica Chelu
  2016-09-23 19:50 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Georgiana Rodica Chelu @ 2016-09-23 19:45 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh

Remove unneeded code in order to make clear
that the function returns 0(success) in all cases.

Done using returnvar.cocci script.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
---
Changes in v2:
        - Give a better reason for the modification

 drivers/staging/ks7010/ks_wlan_net.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index f1cd90e..d13a06b 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -3507,12 +3507,11 @@ int ks_wlan_net_stop(struct net_device *dev)
 {
 	struct ks_wlan_private *priv = netdev_priv(dev);
 
-	int ret = 0;
 	priv->device_open_status = 0;
 	del_timer_sync(&update_phyinfo_timer);
 
 	if (netif_running(dev))
 		netif_stop_queue(dev);
 
-	return ret;
+	return 0;
 }
-- 
2.7.4



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

* Re: [Outreachy kernel] [PATCH v2] staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value
  2016-09-23 19:45 [PATCH v2] staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value Georgiana Rodica Chelu
@ 2016-09-23 19:50 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2016-09-23 19:50 UTC (permalink / raw)
  To: Georgiana Rodica Chelu; +Cc: outreachy-kernel, gregkh



On Fri, 23 Sep 2016, Georgiana Rodica Chelu wrote:

> Remove unneeded code in order to make clear
> that the function returns 0(success) in all cases.
>
> Done using returnvar.cocci script.
>
> Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

> ---
> Changes in v2:
>         - Give a better reason for the modification
>
>  drivers/staging/ks7010/ks_wlan_net.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> index f1cd90e..d13a06b 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -3507,12 +3507,11 @@ int ks_wlan_net_stop(struct net_device *dev)
>  {
>  	struct ks_wlan_private *priv = netdev_priv(dev);
>
> -	int ret = 0;
>  	priv->device_open_status = 0;
>  	del_timer_sync(&update_phyinfo_timer);
>
>  	if (netif_running(dev))
>  		netif_stop_queue(dev);
>
> -	return ret;
> +	return 0;
>  }
> --
> 2.7.4
>
> --
> 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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160923194525.GA7252%40fireworks.
> For more options, visit https://groups.google.com/d/optout.
>


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

end of thread, other threads:[~2016-09-23 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-23 19:45 [PATCH v2] staging: ks7010: ks_wlan_net: Remove unnecessary variable used to store return value Georgiana Rodica Chelu
2016-09-23 19:50 ` [Outreachy kernel] " Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.