* [PATCH] dmaengine: at_xdmac: Replace two if statements with only one with two conditions
@ 2022-08-02 14:06 Tudor Ambarus
2022-09-05 6:32 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Tudor Ambarus @ 2022-08-02 14:06 UTC (permalink / raw)
To: vkoul
Cc: ludovic.desroches, linux-arm-kernel, dmaengine, linux-kernel,
Tudor Ambarus
Add a cosmetic change and replace two if statements with a single if
statement with two conditions. In case the optional txstate parameter is
NULL, we return the dma_cookie_status, which is fine, no functional change
required.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
---
drivers/dma/at_xdmac.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index def564d1e8fa..0aa3ae8d61e4 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1463,10 +1463,7 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
bool initd;
ret = dma_cookie_status(chan, cookie, txstate);
- if (ret == DMA_COMPLETE)
- return ret;
-
- if (!txstate)
+ if (ret == DMA_COMPLETE || !txstate)
return ret;
spin_lock_irqsave(&atchan->lock, flags);
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: at_xdmac: Replace two if statements with only one with two conditions
2022-08-02 14:06 [PATCH] dmaengine: at_xdmac: Replace two if statements with only one with two conditions Tudor Ambarus
@ 2022-09-05 6:32 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-09-05 6:32 UTC (permalink / raw)
To: Tudor Ambarus
Cc: ludovic.desroches, linux-arm-kernel, dmaengine, linux-kernel
On 02-08-22, 17:06, Tudor Ambarus wrote:
> Add a cosmetic change and replace two if statements with a single if
> statement with two conditions. In case the optional txstate parameter is
> NULL, we return the dma_cookie_status, which is fine, no functional change
> required.
Applied, thanks
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-05 6:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-02 14:06 [PATCH] dmaengine: at_xdmac: Replace two if statements with only one with two conditions Tudor Ambarus
2022-09-05 6:32 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox