Skip to contentSkip to conversation

arm: davinci: use for_each_set_bit_from

PATCH New Akinobu Mita 2 participants 2 messages Apr 11, 2012 – Apr 17, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm: davinci: use for_each_set_bit_from

Use for_each_set_bit_from to iterate over all the set bit in a memory region.

Cc Sekhar Nori <[email protected]>
Cc Christian Riesch <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc davinci-linux-open-source at linux.davincidsp.com
Cc Russell King <[email protected]>
Cc linux-arm-kernel at lists.infradead.org

---
v2: remove uncorrect semicolon at the end of the line found by Christian Riesch

 arch/arm/mach-davinci/dma.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-davinci/dma.c +3 -3
index fd33919..95ce019 100644
@@ -557,9 +557,9 @@ static int reserve_contiguous_slots(int ctlr, unsigned int id,
 	if (i == edma_cc[ctlr]->num_slots)
 		stop_slot = i;
 
-	for (j = start_slot; j < stop_slot; j++)
-		if (test_bit(j, tmp_inuse))
-			clear_bit(j, edma_cc[ctlr]->edma_inuse);
+	j = start_slot;
+	for_each_set_bit_from(j, tmp_inuse, stop_slot)
+		clear_bit(j, edma_cc[ctlr]->edma_inuse);
 
 	if (count)
 		return -EBUSY;
Signature · 1 line
1.7.4.4
#1 lore raw

PATCH v2 1/1 arm: davinci: use for_each_set_bit_from

Hi Akinobu,

Quoted 11 lines · Akinobu Mita

Use for_each_set_bit_from to iterate over all the set bit in a memory region.

Cc Sekhar Nori <[email protected]>
Cc Christian Riesch <[email protected]>
Cc Kevin Hilman <[email protected]>
Cc davinci-linux-open-source at linux.davincidsp.com
Cc Russell King <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
Quoted 2 lines

---
v2: remove uncorrect semicolon at the end of the line found by Christian Riesch

Yes, good catch by Christian. Queuing this one for v3.5

Thanks,
Sekhar