linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] liquidio: remove redundant setting of inst_processed to zero
@ 2017-11-01  9:09 Colin King
  2017-11-02  6:54 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-01  9:09 UTC (permalink / raw)
  To: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi, netdev
  Cc: kernel-janitors, linux-kernel

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

The zero value assigned to inst_processed at the end of each
iteration of the do-while loop is overwritten on the next iteration
and hence it is a redundant assignment and can be removed. Cleans
up clang warning:

drivers/net/ethernet/cavium/liquidio/request_manager.c:480:3:
warning: Value stored to 'inst_processed' is never read

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

diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
index 1e0fbce86d60..11aaa35e45ab 100644
--- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
+++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
@@ -477,8 +477,6 @@ octeon_flush_iq(struct octeon_device *oct, struct octeon_instr_queue *iq,
 		}
 
 		tot_inst_processed += inst_processed;
-		inst_processed = 0;
-
 	} while (tot_inst_processed < napi_budget);
 
 	if (napi_budget && (tot_inst_processed >= napi_budget))
-- 
2.14.1

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

* Re: [PATCH] liquidio: remove redundant setting of inst_processed to zero
  2017-11-01  9:09 [PATCH] liquidio: remove redundant setting of inst_processed to zero Colin King
@ 2017-11-02  6:54 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-02  6:54 UTC (permalink / raw)
  To: colin.king
  Cc: derek.chickles, satananda.burla, felix.manlunas, raghu.vatsavayi,
	netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed,  1 Nov 2017 09:09:13 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> The zero value assigned to inst_processed at the end of each
> iteration of the do-while loop is overwritten on the next iteration
> and hence it is a redundant assignment and can be removed. Cleans
> up clang warning:
> 
> drivers/net/ethernet/cavium/liquidio/request_manager.c:480:3:
> warning: Value stored to 'inst_processed' is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

end of thread, other threads:[~2017-11-02  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01  9:09 [PATCH] liquidio: remove redundant setting of inst_processed to zero Colin King
2017-11-02  6:54 ` 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).