[PATCH] omap-dma: simplify omap_dma_busy()

From: Yury Norov
Date: Sat Jul 19 2025 - 22:30:36 EST


From: Yury Norov (NVIDIA) <yury.norov@xxxxxxxxx>

Use for_each_set_bit() and get rid of housekeeping code.

Signed-off-by: Yury Norov (NVIDIA) <yury.norov@xxxxxxxxx>
---
drivers/dma/ti/omap-dma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c
index 8c023c6e623a..ac5c1f32c856 100644
--- a/drivers/dma/ti/omap-dma.c
+++ b/drivers/dma/ti/omap-dma.c
@@ -1530,12 +1530,9 @@ static void omap_dma_free(struct omap_dmadev *od)
static bool omap_dma_busy(struct omap_dmadev *od)
{
struct omap_chan *c;
- int lch = -1;
+ int lch;

- while (1) {
- lch = find_next_bit(od->lch_bitmap, od->lch_count, lch + 1);
- if (lch >= od->lch_count)
- break;
+ for_each_set_bit(lch, od->lch_bitmap, od->lch_count) {
c = od->lch_map[lch];
if (!c)
continue;
--
2.43.0