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

From: Gustavo A. R. Silva
Date: Tue May 16 2017 - 12:18:36 EST


Hi Michael,

Quoting Michael Chan <michael.chan@xxxxxxxxxxxx>:

On Mon, May 15, 2017 at 3:28 PM, Gustavo A. R. Silva
<garsilva@xxxxxxxxxxxxxx> wrote:
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 <garsilva@xxxxxxxxxxxxxx>
---
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