[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220820125717.588722-24-tudor.ambarus@microchip.com>
Date: Sat, 20 Aug 2022 15:57:07 +0300
From: Tudor Ambarus <tudor.ambarus@...rochip.com>
To: <vkoul@...nel.org>, <peda@...ntia.se>, <du@...ntia.se>,
<regressions@...mhuis.info>
CC: <ludovic.desroches@...rochip.com>, <maciej.sosnowski@...el.com>,
<tudor.ambarus@...rochip.com>, <dan.j.williams@...el.com>,
<nicolas.ferre@...rochip.com>, <mripard@...nel.org>,
<torfl6749@...il.com>, <linux-kernel@...r.kernel.org>,
<dmaengine@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>
Subject: [PATCH 23/33] dmaengine: at_hdmac: s/atc_get_bytes_left/atc_get_residue
Use dmaengine terminology and rename the method to better indicate what it
does: it gets the residue value which will be later on set with
dma_set_residue().
Signed-off-by: Tudor Ambarus <tudor.ambarus@...rochip.com>
---
drivers/dma/at_hdmac.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index abb884a08bd4..daf2a3af25d4 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -743,15 +743,15 @@ static inline u32 atc_calc_bytes_left(u32 current_len, u32 ctrla)
}
/**
- * atc_get_bytes_left - get the number of bytes residue for a cookie.
+ * atc_get_residue - get the number of bytes residue for a cookie.
* The residue is passed by address and updated on success.
* @chan: DMA channel
* @cookie: transaction identifier to check status of
* @residue: residue to be updated.
* Return 0 on success, -errono otherwise.
*/
-static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie,
- u32 *residue)
+static int atc_get_residue(struct dma_chan *chan, dma_cookie_t cookie,
+ u32 *residue)
{
struct at_dma_chan *atchan = to_at_dma_chan(chan);
struct at_desc *desc_first = atc_first_active(atchan);
@@ -1913,10 +1913,7 @@ atc_tx_status(struct dma_chan *chan,
return dma_status;
spin_lock_irqsave(&atchan->lock, flags);
-
- /* Get number of bytes left in the active transactions */
- ret = atc_get_bytes_left(chan, cookie, &residue);
-
+ ret = atc_get_residue(chan, cookie, &residue);
spin_unlock_irqrestore(&atchan->lock, flags);
if (unlikely(ret < 0)) {
--
2.25.1
Powered by blists - more mailing lists