* [PATCH] dmaengine: ti: k3-udma: Remove redundant is_slave_direction() checks
@ 2020-08-24 12:01 Peter Ujfalusi
2020-08-25 10:24 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2020-08-24 12:01 UTC (permalink / raw)
To: vkoul; +Cc: dmaengine, dan.j.williams
The direction has been already validated in the main callback and there is
no need to check it again in the TR mode handlers for slave_sg and cyclic.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/dma/ti/k3-udma.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 30cb514cee54..989998b6e078 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -2024,11 +2024,6 @@ udma_prep_slave_sg_tr(struct udma_chan *uc, struct scatterlist *sgl,
int num_tr = 0;
int tr_idx = 0;
- if (!is_slave_direction(dir)) {
- dev_err(uc->ud->dev, "Only slave cyclic is supported\n");
- return NULL;
- }
-
/* estimate the number of TRs we will need */
for_each_sg(sgl, sgent, sglen, i) {
if (sg_dma_len(sgent) < SZ_64K)
@@ -2400,11 +2395,6 @@ udma_prep_dma_cyclic_tr(struct udma_chan *uc, dma_addr_t buf_addr,
unsigned int i;
int num_tr;
- if (!is_slave_direction(dir)) {
- dev_err(uc->ud->dev, "Only slave cyclic is supported\n");
- return NULL;
- }
-
num_tr = udma_get_tr_counters(period_len, __ffs(buf_addr), &tr0_cnt0,
&tr0_cnt1, &tr1_cnt0);
if (num_tr < 0) {
--
Peter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dmaengine: ti: k3-udma: Remove redundant is_slave_direction() checks
2020-08-24 12:01 [PATCH] dmaengine: ti: k3-udma: Remove redundant is_slave_direction() checks Peter Ujfalusi
@ 2020-08-25 10:24 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2020-08-25 10:24 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: dmaengine, dan.j.williams
On 24-08-20, 15:01, Peter Ujfalusi wrote:
> The direction has been already validated in the main callback and there is
> no need to check it again in the TR mode handlers for slave_sg and cyclic.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-08-25 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-24 12:01 [PATCH] dmaengine: ti: k3-udma: Remove redundant is_slave_direction() checks Peter Ujfalusi
2020-08-25 10:24 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox