Commit 080aadda authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller

fsl/fman_port: remove redundant check on port->rev_info.major

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7d852e3
...@@ -1391,12 +1391,10 @@ int fman_port_config(struct fman_port *port, struct fman_port_params *params) ...@@ -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 /* FM_WRONG_RESET_VALUES_ERRATA_FMAN_A005127 Errata
* workaround * workaround
*/ */
if (port->rev_info.major >= 6) { u32 reg;
u32 reg;
reg = 0x00001013; reg = 0x00001013;
iowrite32be(reg, &port->bmi_regs->tx.fmbm_tfp); iowrite32be(reg, &port->bmi_regs->tx.fmbm_tfp);
}
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment