Skip to content

Commit

Permalink
fsl/fman_port: remove redundant check on port->rev_info.major
Browse files Browse the repository at this point in the history
The check port->rev_info.major >= 6 is being performed twice, thus
the inner second check is always true and is redundant, hence it
can be removed. Detected by cppcheck.

drivers/net/ethernet/freescale/fman/fman_port.c:1394]: (warning)
Identical inner 'if' condition is always true.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Apr 24, 2018
1 parent c7d852e commit 080aadd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/net/ethernet/freescale/fman/fman_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,12 +1391,10 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params)
/* FM_WRONG_RESET_VALUES_ERRATA_FMAN_A005127 Errata
* workaround
*/
if (port->rev_info.major >= 6) {
u32 reg;
u32 reg;

reg = 0x00001013;
iowrite32be(reg, &port->bmi_regs->tx.fmbm_tfp);
}
reg = 0x00001013;
iowrite32be(reg, &port->bmi_regs->tx.fmbm_tfp);
}

return 0;
Expand Down

0 comments on commit 080aadd

Please sign in to comment.