linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: gianfar_ethtool: remove redundant variable last_rule_idx
@ 2018-07-04  7:54 Colin King
  2018-07-04  8:43 ` Claudiu Manoil
  2018-07-04 13:40 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-07-04  7:54 UTC (permalink / raw)
  To: Claudiu Manoil, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variable last_rule_idx is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'last_rule_idx' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/freescale/gianfar_ethtool.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 8cb98cae0a6f..395a5266ea30 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -740,7 +740,6 @@ static void ethflow_to_filer_rules (struct gfar_private *priv, u64 ethflow)
 static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow,
 				       u64 class)
 {
-	unsigned int last_rule_idx = priv->cur_filer_idx;
 	unsigned int cmp_rqfpr;
 	unsigned int *local_rqfpr;
 	unsigned int *local_rqfcr;
@@ -819,7 +818,6 @@ static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow,
 	}
 
 	priv->cur_filer_idx = l - 1;
-	last_rule_idx = l;
 
 	/* hash rules */
 	ethflow_to_filer_rules(priv, ethflow);
-- 
2.17.1


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

* RE: [PATCH] net: ethernet: gianfar_ethtool: remove redundant variable last_rule_idx
  2018-07-04  7:54 [PATCH] net: ethernet: gianfar_ethtool: remove redundant variable last_rule_idx Colin King
@ 2018-07-04  8:43 ` Claudiu Manoil
  2018-07-04 13:40 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Claudiu Manoil @ 2018-07-04  8:43 UTC (permalink / raw)
  To: Colin King, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

>-----Original Message-----
>From: Colin King [mailto:colin.king@canonical.com]
>Sent: Wednesday, July 4, 2018 10:55 AM
>To: Claudiu Manoil <claudiu.manoil@nxp.com>; David S . Miller
><davem@davemloft.net>; netdev@vger.kernel.org
>Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
>Subject: [PATCH] net: ethernet: gianfar_ethtool: remove redundant variable
>last_rule_idx
>
>From: Colin Ian King <colin.king@canonical.com>
>
>Variable last_rule_idx is being assigned but is never used hence it is
>redundant and can be removed.
>
>Cleans up clang warning:
>warning: variable 'last_rule_idx' set but not used [-Wunused-but-set-variable]
>
>Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Claudiu Manoil <claudiu.manoil@nxp.com>

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

* Re: [PATCH] net: ethernet: gianfar_ethtool: remove redundant variable last_rule_idx
  2018-07-04  7:54 [PATCH] net: ethernet: gianfar_ethtool: remove redundant variable last_rule_idx Colin King
  2018-07-04  8:43 ` Claudiu Manoil
@ 2018-07-04 13:40 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-07-04 13:40 UTC (permalink / raw)
  To: colin.king; +Cc: claudiu.manoil, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed,  4 Jul 2018 08:54:55 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable last_rule_idx is being assigned but is never used hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'last_rule_idx' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

end of thread, other threads:[~2018-07-04 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04  7:54 [PATCH] net: ethernet: gianfar_ethtool: remove redundant variable last_rule_idx Colin King
2018-07-04  8:43 ` Claudiu Manoil
2018-07-04 13:40 ` David Miller

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