* [PATCH] net: lio_core: remove redundant assignment to variable tx_done
@ 2020-05-08 22:58 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-05-08 22:58 UTC (permalink / raw)
To: Derek Chickles, Satanand Burla, Felix Manlunas, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable tx_done is being assigned with a value that is never read
as the function returns a few statements later. The assignment is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/cavium/liquidio/lio_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/ethernet/cavium/liquidio/lio_core.c
index d7e805749a5b..e40c64b79f66 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_core.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c
@@ -782,7 +782,6 @@ static int liquidio_napi_poll(struct napi_struct *napi, int budget)
if ((work_done < budget && tx_done) ||
(iq && iq->pkt_in_done >= MAX_REG_CNT) ||
(droq->pkt_count >= MAX_REG_CNT)) {
- tx_done = 1;
napi_complete_done(napi, work_done);
octeon_enable_irq(droq->oct_dev, droq->q_no);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] net: lio_core: remove redundant assignment to variable tx_done
@ 2020-05-08 22:58 ` Colin King
0 siblings, 0 replies; 4+ messages in thread
From: Colin King @ 2020-05-08 22:58 UTC (permalink / raw)
To: Derek Chickles, Satanand Burla, Felix Manlunas, David S . Miller, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The variable tx_done is being assigned with a value that is never read
as the function returns a few statements later. The assignment is
redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/cavium/liquidio/lio_core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/ethernet/cavium/liquidio/lio_core.c
index d7e805749a5b..e40c64b79f66 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_core.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c
@@ -782,7 +782,6 @@ static int liquidio_napi_poll(struct napi_struct *napi, int budget)
if ((work_done < budget && tx_done) ||
(iq && iq->pkt_in_done >= MAX_REG_CNT) ||
(droq->pkt_count >= MAX_REG_CNT)) {
- tx_done = 1;
napi_complete_done(napi, work_done);
octeon_enable_irq(droq->oct_dev, droq->q_no);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: lio_core: remove redundant assignment to variable tx_done
2020-05-08 22:58 ` Colin King
@ 2020-05-09 5:48 ` Jakub Kicinski
-1 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-05-09 5:48 UTC (permalink / raw)
To: Colin King
Cc: Derek Chickles, Satanand Burla, Felix Manlunas, David S . Miller,
netdev, kernel-janitors, linux-kernel
On Fri, 8 May 2020 23:58:10 +0100 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable tx_done is being assigned with a value that is never read
> as the function returns a few statements later. The assignment is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied, thank you!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: lio_core: remove redundant assignment to variable tx_done
@ 2020-05-09 5:48 ` Jakub Kicinski
0 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-05-09 5:48 UTC (permalink / raw)
To: Colin King
Cc: Derek Chickles, Satanand Burla, Felix Manlunas, David S . Miller,
netdev, kernel-janitors, linux-kernel
On Fri, 8 May 2020 23:58:10 +0100 Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The variable tx_done is being assigned with a value that is never read
> as the function returns a few statements later. The assignment is
> redundant and can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied, thank you!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-09 5:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 22:58 [PATCH] net: lio_core: remove redundant assignment to variable tx_done Colin King
2020-05-08 22:58 ` Colin King
2020-05-09 5:48 ` Jakub Kicinski
2020-05-09 5:48 ` Jakub Kicinski
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.