* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
[not found] <1333442836-9947-1-git-send-email-akinobu.mita@gmail.com>
@ 2012-04-03 8:47 ` Akinobu Mita
2012-04-10 16:42 ` Sekhar Nori
[not found] ` <CABkLObr4Vyp9FwxfOquFjqnh1rEaLXNAzBV4SV-PO=UA4EC2vA@mail.gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Akinobu Mita @ 2012-04-03 8:47 UTC (permalink / raw)
To: linux-arm-kernel
Use for_each_set_bit_from to iterate over all the set bit in a memory
region.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: davinci-linux-open-source at linux.davincidsp.com
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel at lists.infradead.org
---
arch/arm/mach-davinci/dma.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index fd33919..2a41339 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -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;
--
1.7.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
2012-04-03 8:47 ` [PATCH 3/4] arm: davinci: use for_each_set_bit_from Akinobu Mita
@ 2012-04-10 16:42 ` Sekhar Nori
2012-04-10 21:08 ` Akinobu Mita
[not found] ` <CABkLObr4Vyp9FwxfOquFjqnh1rEaLXNAzBV4SV-PO=UA4EC2vA@mail.gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Sekhar Nori @ 2012-04-10 16:42 UTC (permalink / raw)
To: linux-arm-kernel
Hi Akinobu,
On 4/3/2012 2:17 PM, Akinobu Mita wrote:
> Use for_each_set_bit_from to iterate over all the set bit in a memory
> region.
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: davinci-linux-open-source at linux.davincidsp.com
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: linux-arm-kernel at lists.infradead.org
Looks good to me. If you are planning to send this upstream outside of
davinci tree, please add my:
Acked-by: Sekhar Nori <nsekhar@ti.com>
Else, let me know and I will be happy to queue it.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
[not found] ` <CABkLObr4Vyp9FwxfOquFjqnh1rEaLXNAzBV4SV-PO=UA4EC2vA@mail.gmail.com>
@ 2012-04-10 21:02 ` Akinobu Mita
0 siblings, 0 replies; 4+ messages in thread
From: Akinobu Mita @ 2012-04-10 21:02 UTC (permalink / raw)
To: linux-arm-kernel
2012/4/11 Christian Riesch <christian.riesch@omicron.at>:
>> --- a/arch/arm/mach-davinci/dma.c
>> +++ b/arch/arm/mach-davinci/dma.c
>> @@ -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);
>
> Is the semicolon at the end of the line correct?
It's clearly a bug that I was going to introduce. I'll fix and
resend it.
Thanks a lot.
>> + ? ? ? ? ? ? ? clear_bit(j, edma_cc[ctlr]->edma_inuse);
>>
>> ? ? ? ?if (count)
>> ? ? ? ? ? ? ? ?return -EBUSY;
>> --
>> 1.7.4.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo at vger.kernel.org
>> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at ?http://www.tux.org/lkml/
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
2012-04-10 16:42 ` Sekhar Nori
@ 2012-04-10 21:08 ` Akinobu Mita
0 siblings, 0 replies; 4+ messages in thread
From: Akinobu Mita @ 2012-04-10 21:08 UTC (permalink / raw)
To: linux-arm-kernel
2012/4/11 Sekhar Nori <nsekhar@ti.com>:
> Hi Akinobu,
>
> On 4/3/2012 2:17 PM, Akinobu Mita wrote:
>> Use for_each_set_bit_from to iterate over all the set bit in a memory
>> region.
>>
>> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
>> Cc: Sekhar Nori <nsekhar@ti.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: davinci-linux-open-source at linux.davincidsp.com
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: linux-arm-kernel at lists.infradead.org
>
> Looks good to me. If you are planning to send this upstream outside of
> davinci tree, please add my:
>
> Acked-by: Sekhar Nori <nsekhar@ti.com>
>
> Else, let me know and I will be happy to queue it.
Christian found a bug in this patch. So I'll resend it, then please queue it
to your tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-10 21:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1333442836-9947-1-git-send-email-akinobu.mita@gmail.com>
2012-04-03 8:47 ` [PATCH 3/4] arm: davinci: use for_each_set_bit_from Akinobu Mita
2012-04-10 16:42 ` Sekhar Nori
2012-04-10 21:08 ` Akinobu Mita
[not found] ` <CABkLObr4Vyp9FwxfOquFjqnh1rEaLXNAzBV4SV-PO=UA4EC2vA@mail.gmail.com>
2012-04-10 21:02 ` Akinobu Mita
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).