* [PATCH] net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset()
@ 2020-03-19 13:10 Dejin Zheng
2020-03-20 4:08 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Dejin Zheng @ 2020-03-19 13:10 UTC (permalink / raw)
To: peppe.cavallaro, alexandre.torgue, joabreu, davem,
mcoquelin.stm32, netdev
Cc: linux-stm32, linux-arm-kernel, linux-kernel, Dejin Zheng
it will check the return value of dwmac_dma_reset() in the
stmmac_init_dma_engine() function and report an error if the
return value is not zero. so don't need check here.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
index 688d36095333..cb87d31a99df 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
@@ -16,19 +16,14 @@
int dwmac_dma_reset(void __iomem *ioaddr)
{
u32 value = readl(ioaddr + DMA_BUS_MODE);
- int err;
/* DMA SW reset */
value |= DMA_BUS_MODE_SFT_RESET;
writel(value, ioaddr + DMA_BUS_MODE);
- err = readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
+ return readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
!(value & DMA_BUS_MODE_SFT_RESET),
10000, 100000);
- if (err)
- return -EBUSY;
-
- return 0;
}
/* CSR1 enables the transmit DMA to check for new descriptor */
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset()
2020-03-19 13:10 [PATCH] net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset() Dejin Zheng
@ 2020-03-20 4:08 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-20 4:08 UTC (permalink / raw)
To: zhengdejin5
Cc: peppe.cavallaro, alexandre.torgue, joabreu, mcoquelin.stm32,
netdev, linux-stm32, linux-arm-kernel, linux-kernel
From: Dejin Zheng <zhengdejin5@gmail.com>
Date: Thu, 19 Mar 2020 21:10:19 +0800
> it will check the return value of dwmac_dma_reset() in the
> stmmac_init_dma_engine() function and report an error if the
> return value is not zero. so don't need check here.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-20 4:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 13:10 [PATCH] net: stmmac: dwmac_lib: remove unnecessary checks in dwmac_dma_reset() Dejin Zheng
2020-03-20 4:08 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).