diff options
| author | Vince Bridgers <vbridgers2013@gmail.com> | 2014-06-29 21:34:53 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-07-02 21:37:54 -0400 |
| commit | c8df8ce3ee5ff24993bba9033e7d13b16fa3809c (patch) | |
| tree | 4b8f6ea2f6816e15bc76207857c38dc0797a1068 | |
| parent | 43d24e48940d04f587818fadc5305b109f5cb8cf (diff) | |
net: stmmac: Remove unneeded I/O read caught by cppcheck
Cppcheck found a case where a local variable was being assigned a value,
but not used. There seems to be no reason to read this register before
assigning a new value, so addressing thie issue.
cppcheck --force --enable=all --inline-suppr . shows ...
Variable 'value' is reassigned a value before the old one has been used.
Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c index b3e148ef5683..9d3748361a1e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | |||
| @@ -320,11 +320,8 @@ static void dwmac1000_set_eee_timer(void __iomem *ioaddr, int ls, int tw) | |||
| 320 | 320 | ||
| 321 | static void dwmac1000_ctrl_ane(void __iomem *ioaddr, bool restart) | 321 | static void dwmac1000_ctrl_ane(void __iomem *ioaddr, bool restart) |
| 322 | { | 322 | { |
| 323 | u32 value; | ||
| 324 | |||
| 325 | value = readl(ioaddr + GMAC_AN_CTRL); | ||
| 326 | /* auto negotiation enable and External Loopback enable */ | 323 | /* auto negotiation enable and External Loopback enable */ |
| 327 | value = GMAC_AN_CTRL_ANE | GMAC_AN_CTRL_ELE; | 324 | u32 value = GMAC_AN_CTRL_ANE | GMAC_AN_CTRL_ELE; |
| 328 | 325 | ||
| 329 | if (restart) | 326 | if (restart) |
| 330 | value |= GMAC_AN_CTRL_RAN; | 327 | value |= GMAC_AN_CTRL_RAN; |
