Skip to content

Commit 6fea873

Browse files
Peter Ujfalusivinodkoul
authored andcommitted
dmaengine: ti: k3-udma: Remove udma_chan.in_ring_cnt
The in_ring_cnt is not used for anything, it can be removed. Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5bbeea3 commit 6fea873

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

drivers/dma/ti/k3-udma.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ struct udma_chan {
231231
struct udma_tx_drain tx_drain;
232232

233233
u32 bcnt; /* number of bytes completed since the start of the channel */
234-
u32 in_ring_cnt; /* number of descriptors in flight */
235234

236235
/* Channel configuration parameters */
237236
struct udma_chan_config config;
@@ -574,7 +573,6 @@ static int udma_push_to_ring(struct udma_chan *uc, int idx)
574573
struct udma_desc *d = uc->desc;
575574
struct k3_ring *ring = NULL;
576575
dma_addr_t paddr;
577-
int ret;
578576

579577
switch (uc->config.dir) {
580578
case DMA_DEV_TO_MEM:
@@ -598,11 +596,7 @@ static int udma_push_to_ring(struct udma_chan *uc, int idx)
598596
udma_sync_for_device(uc, idx);
599597
}
600598

601-
ret = k3_ringacc_ring_push(ring, &paddr);
602-
if (!ret)
603-
uc->in_ring_cnt++;
604-
605-
return ret;
599+
return k3_ringacc_ring_push(ring, &paddr);
606600
}
607601

608602
static bool udma_desc_is_rx_flush(struct udma_chan *uc, dma_addr_t addr)
@@ -655,9 +649,6 @@ static int udma_pop_from_ring(struct udma_chan *uc, dma_addr_t *addr)
655649
d->hwdesc[0].cppi5_desc_size,
656650
DMA_FROM_DEVICE);
657651
rmb(); /* Ensure that reads are not moved before this point */
658-
659-
if (!ret)
660-
uc->in_ring_cnt--;
661652
}
662653

663654
return ret;
@@ -697,8 +688,6 @@ static void udma_reset_rings(struct udma_chan *uc)
697688
udma_desc_free(&uc->terminated_desc->vd);
698689
uc->terminated_desc = NULL;
699690
}
700-
701-
uc->in_ring_cnt = 0;
702691
}
703692

704693
static void udma_reset_counters(struct udma_chan *uc)
@@ -1073,9 +1062,6 @@ static irqreturn_t udma_ring_irq_handler(int irq, void *data)
10731062

10741063
/* Teardown completion message */
10751064
if (cppi5_desc_is_tdcm(paddr)) {
1076-
/* Compensate our internal pop/push counter */
1077-
uc->in_ring_cnt++;
1078-
10791065
complete_all(&uc->teardown_completed);
10801066

10811067
if (uc->terminated_desc) {

0 commit comments

Comments
 (0)