Commit e14549a5 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller

sh_eth: kill useless check in __sh_eth_get_regs()

Iff TSU registers exist on a given [G]Ether controller, they always include
the CAM entry table registers (TSU_ADR{H|L}<n>), thus the check for invalid
TSU_ADRH0 offset in __sh_eth_get_regs() is useless...
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6e80e55b
...@@ -2153,22 +2153,17 @@ static size_t __sh_eth_get_regs(struct net_device *ndev, u32 *buf) ...@@ -2153,22 +2153,17 @@ static size_t __sh_eth_get_regs(struct net_device *ndev, u32 *buf)
add_tsu_reg(TSU_POST2); add_tsu_reg(TSU_POST2);
add_tsu_reg(TSU_POST3); add_tsu_reg(TSU_POST3);
add_tsu_reg(TSU_POST4); add_tsu_reg(TSU_POST4);
if (mdp->reg_offset[TSU_ADRH0] != SH_ETH_OFFSET_INVALID) { /* This is the start of a table, not just a single register. */
/* This is the start of a table, not just a single if (buf) {
* register. unsigned int i;
*/
if (buf) { mark_reg_valid(TSU_ADRH0);
unsigned int i; for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES * 2; i++)
*buf++ = ioread32(mdp->tsu_addr +
mark_reg_valid(TSU_ADRH0); mdp->reg_offset[TSU_ADRH0] +
for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES * 2; i++) i * 4);
*buf++ = ioread32(
mdp->tsu_addr +
mdp->reg_offset[TSU_ADRH0] +
i * 4);
}
len += SH_ETH_TSU_CAM_ENTRIES * 2;
} }
len += SH_ETH_TSU_CAM_ENTRIES * 2;
} }
#undef mark_reg_valid #undef mark_reg_valid
......
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