提交 f5112c8a 编写于 作者: A Antoine Tenart 提交者: David S. Miller

net: phy: mscc-miim: remove redundant timeout check

readl_poll_timeout already returns -ETIMEDOUT if the condition isn't
satisfied, there's no need to check again the condition after calling
it. Remove the redundant timeout check.
Signed-off-by: NAntoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9513167e
......@@ -43,12 +43,8 @@ static int mscc_miim_wait_ready(struct mii_bus *bus)
struct mscc_miim_dev *miim = bus->priv;
u32 val;
readl_poll_timeout(miim->regs + MSCC_MIIM_REG_STATUS, val,
!(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, 10000);
if (val & MSCC_MIIM_STATUS_STAT_BUSY)
return -ETIMEDOUT;
return 0;
return readl_poll_timeout(miim->regs + MSCC_MIIM_REG_STATUS, val,
!(val & MSCC_MIIM_STATUS_STAT_BUSY), 50, 10000);
}
static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册