All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] farsync: remove redundant variable txq_length
@ 2018-07-07 11:27 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-07-07 11:27 UTC (permalink / raw)
  To: Kevin Curtis, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

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

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

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

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

diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index bd46b2552980..2a3f0f1a2b0a 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -2134,7 +2134,6 @@ static void
 fst_openport(struct fst_port_info *port)
 {
 	int signals;
-	int txq_length;
 
 	/* Only init things if card is actually running. This allows open to
 	 * succeed for downloads etc.
@@ -2161,7 +2160,6 @@ fst_openport(struct fst_port_info *port)
 		else
 			netif_carrier_off(port_to_dev(port));
 
-		txq_length = port->txqe - port->txqs;
 		port->txqe = 0;
 		port->txqs = 0;
 	}
-- 
2.17.1


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

* [PATCH] farsync: remove redundant variable txq_length
@ 2018-07-07 11:27 ` Colin King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2018-07-07 11:27 UTC (permalink / raw)
  To: Kevin Curtis, David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

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

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

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

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

diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index bd46b2552980..2a3f0f1a2b0a 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -2134,7 +2134,6 @@ static void
 fst_openport(struct fst_port_info *port)
 {
 	int signals;
-	int txq_length;
 
 	/* Only init things if card is actually running. This allows open to
 	 * succeed for downloads etc.
@@ -2161,7 +2160,6 @@ fst_openport(struct fst_port_info *port)
 		else
 			netif_carrier_off(port_to_dev(port));
 
-		txq_length = port->txqe - port->txqs;
 		port->txqe = 0;
 		port->txqs = 0;
 	}
-- 
2.17.1


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

* Re: [PATCH] farsync: remove redundant variable txq_length
  2018-07-07 11:27 ` Colin King
@ 2018-07-07 11:49   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-07-07 11:49 UTC (permalink / raw)
  To: colin.king; +Cc: kevin.curtis, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Sat,  7 Jul 2018 12:27:30 +0100

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

Applied, thanks.

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

* Re: [PATCH] farsync: remove redundant variable txq_length
@ 2018-07-07 11:49   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-07-07 11:49 UTC (permalink / raw)
  To: colin.king; +Cc: kevin.curtis, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Sat,  7 Jul 2018 12:27:30 +0100

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

Applied, thanks.

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

end of thread, other threads:[~2018-07-07 11:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-07 11:27 [PATCH] farsync: remove redundant variable txq_length Colin King
2018-07-07 11:27 ` Colin King
2018-07-07 11:49 ` David Miller
2018-07-07 11:49   ` David Miller

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.