Thread (3 messages) flat view 3 messages, 2 authors, 2017-05-16

Re: [PATCH] net: ethernet: broadcom: bnxt: remove dead code

From: Gustavo A. R. Silva <hidden>
Date: 2017-05-16 16:18:28
Also in: lkml

Hi Michael,

Quoting Michael Chan [off-list ref]:
On Mon, May 15, 2017 at 3:28 PM, Gustavo A. R. Silva
[off-list ref] wrote:
quoted
Local variable _sh_ is assigned to a constant value and it is never updated
again. Remove this variable and the dead code it guards.

Addresses-Coverity-ID: 1350916
Signed-off-by: Gustavo A. R. Silva <redacted>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c  
b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 1f1e54b..018674b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -7380,12 +7380,10 @@ static int bnxt_get_dflt_rings(struct bnxt  
*bp, int *max_rx, int *max_tx,
 static int bnxt_set_dflt_rings(struct bnxt *bp)
 {
        int dflt_rings, max_rx_rings, max_tx_rings, rc;
-       bool sh = true;
The point of this logic is that we can easily change the default to
shared rings or separate rings.  I think what I'll do is change it so
that the parameter sh is passed in and let the caller decide.  Thanks
for pointing this out.
Sure thing, glad to help.
--
Gustavo A. R. Silva
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help