All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] IB/ipath: use for_each_set_bit and for_each_set_bit_from
@ 2012-04-03  8:47 ` Akinobu Mita
  0 siblings, 0 replies; 12+ messages in thread
From: Akinobu Mita @ 2012-04-03  8:47 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
  Cc: Akinobu Mita, Roland Dreier, Sean Hefty, Hal Rosenstock,
	Mike Marciniszyn, linux-rdma-u79uwXL29TY76Z2rM5mHXA

Use for_each_set_bit() and for_each_set_bit_from() to iterate over all
the set bit in a memory region.

Signed-off-by: Akinobu Mita <akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mike Marciniszyn <infinipath-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/infiniband/hw/ipath/ipath_file_ops.c |   17 +++--------------
 drivers/infiniband/hw/ipath/ipath_intr.c     |    5 ++---
 2 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 736d9ed..f74079e 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -438,10 +438,7 @@ static int ipath_tid_update(struct ipath_portdata *pd, struct file *fp,
 		if (limit > tidcnt)
 			/* just in case size changes in future */
 			limit = tidcnt;
-		tid = find_first_bit((const unsigned long *)tidmap, limit);
-		for (; tid < limit; tid++) {
-			if (!test_bit(tid, tidmap))
-				continue;
+		for_each_set_bit(tid, tidmap, limit) {
 			if (dd->ipath_pageshadow[porttid + tid]) {
 				ipath_cdbg(VERBOSE, "Freeing TID %u\n",
 					   tid);
@@ -548,16 +545,8 @@ static int ipath_tid_free(struct ipath_portdata *pd, unsigned subport,
 	ipath_cdbg(VERBOSE, "Port%u free %u tids; first bit (max=%d) "
 		   "set is %d, porttid %u\n", pd->port_port, ti->tidcnt,
 		   limit, tid, porttid);
-	for (cnt = 0; tid < limit; tid++) {
-		/*
-		 * small optimization; if we detect a run of 3 or so without
-		 * any set, use find_first_bit again.  That's mainly to
-		 * accelerate the case where we wrapped, so we have some at
-		 * the beginning, and some at the end, and a big gap
-		 * in the middle.
-		 */
-		if (!test_bit(tid, tidmap))
-			continue;
+	cnt = 0;
+	for_each_set_bit_from(tid, tidmap, limit) {
 		cnt++;
 		if (dd->ipath_pageshadow[porttid + tid]) {
 			struct page *p;
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index c0a03ac..ee8d0d7 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -79,9 +79,8 @@ void ipath_disarm_senderrbufs(struct ipath_devdata *dd)
 			printk("\n");
 		}
 
-		for (i = 0; i < piobcnt; i++)
-			if (test_bit(i, sbuf))
-				ipath_disarm_piobufs(dd, i, 1);
+		for_each_set_bit(i, sbuf, piobcnt)
+			ipath_disarm_piobufs(dd, i, 1);
 		/* ignore armlaunch errs for a bit */
 		dd->ipath_lastcancel = jiffies+3;
 	}
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 1/4] IB/ipath: use for_each_set_bit and for_each_set_bit_from
@ 2012-04-03  8:47 ` Akinobu Mita
  0 siblings, 0 replies; 12+ messages in thread
From: Akinobu Mita @ 2012-04-03  8:47 UTC (permalink / raw)
  To: linux-kernel, akpm
  Cc: Akinobu Mita, Roland Dreier, Sean Hefty, Hal Rosenstock,
	Mike Marciniszyn, linux-rdma

Use for_each_set_bit() and 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: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: Mike Marciniszyn <infinipath@qlogic.com>
Cc: linux-rdma@vger.kernel.org
---
 drivers/infiniband/hw/ipath/ipath_file_ops.c |   17 +++--------------
 drivers/infiniband/hw/ipath/ipath_intr.c     |    5 ++---
 2 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index 736d9ed..f74079e 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -438,10 +438,7 @@ static int ipath_tid_update(struct ipath_portdata *pd, struct file *fp,
 		if (limit > tidcnt)
 			/* just in case size changes in future */
 			limit = tidcnt;
-		tid = find_first_bit((const unsigned long *)tidmap, limit);
-		for (; tid < limit; tid++) {
-			if (!test_bit(tid, tidmap))
-				continue;
+		for_each_set_bit(tid, tidmap, limit) {
 			if (dd->ipath_pageshadow[porttid + tid]) {
 				ipath_cdbg(VERBOSE, "Freeing TID %u\n",
 					   tid);
@@ -548,16 +545,8 @@ static int ipath_tid_free(struct ipath_portdata *pd, unsigned subport,
 	ipath_cdbg(VERBOSE, "Port%u free %u tids; first bit (max=%d) "
 		   "set is %d, porttid %u\n", pd->port_port, ti->tidcnt,
 		   limit, tid, porttid);
-	for (cnt = 0; tid < limit; tid++) {
-		/*
-		 * small optimization; if we detect a run of 3 or so without
-		 * any set, use find_first_bit again.  That's mainly to
-		 * accelerate the case where we wrapped, so we have some at
-		 * the beginning, and some at the end, and a big gap
-		 * in the middle.
-		 */
-		if (!test_bit(tid, tidmap))
-			continue;
+	cnt = 0;
+	for_each_set_bit_from(tid, tidmap, limit) {
 		cnt++;
 		if (dd->ipath_pageshadow[porttid + tid]) {
 			struct page *p;
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index c0a03ac..ee8d0d7 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -79,9 +79,8 @@ void ipath_disarm_senderrbufs(struct ipath_devdata *dd)
 			printk("\n");
 		}
 
-		for (i = 0; i < piobcnt; i++)
-			if (test_bit(i, sbuf))
-				ipath_disarm_piobufs(dd, i, 1);
+		for_each_set_bit(i, sbuf, piobcnt)
+			ipath_disarm_piobufs(dd, i, 1);
 		/* ignore armlaunch errs for a bit */
 		dd->ipath_lastcancel = jiffies+3;
 	}
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/4] IB/qib: use for_each_set_bit and for_each_set_bit_from
  2012-04-03  8:47 ` Akinobu Mita
  (?)
@ 2012-04-03  8:47 ` Akinobu Mita
  -1 siblings, 0 replies; 12+ messages in thread
From: Akinobu Mita @ 2012-04-03  8:47 UTC (permalink / raw)
  To: linux-kernel, akpm
  Cc: Akinobu Mita, Roland Dreier, Sean Hefty, Hal Rosenstock,
	Mike Marciniszyn, linux-rdma

Use for_each_set_bit() and 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: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Cc: Mike Marciniszyn <infinipath@qlogic.com>
Cc: linux-rdma@vger.kernel.org
---
 drivers/infiniband/hw/qib/qib_file_ops.c |   22 ++++------------------
 drivers/infiniband/hw/qib/qib_tx.c       |   14 +++++---------
 2 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index a740324..7c901d9 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -399,10 +399,7 @@ cleanup:
 		if (limit > tidcnt)
 			/* just in case size changes in future */
 			limit = tidcnt;
-		tid = find_first_bit((const unsigned long *)tidmap, limit);
-		for (; tid < limit; tid++) {
-			if (!test_bit(tid, tidmap))
-				continue;
+		for_each_set_bit(tid, tidmap, limit) {
 			if (dd->pageshadow[ctxttid + tid]) {
 				dma_addr_t phys;
 
@@ -504,17 +501,8 @@ static int qib_tid_free(struct qib_ctxtdata *rcd, unsigned subctxt,
 	if (limit > tidcnt)
 		/* just in case size changes in future */
 		limit = tidcnt;
-	tid = find_first_bit(tidmap, limit);
-	for (cnt = 0; tid < limit; tid++) {
-		/*
-		 * small optimization; if we detect a run of 3 or so without
-		 * any set, use find_first_bit again.  That's mainly to
-		 * accelerate the case where we wrapped, so we have some at
-		 * the beginning, and some at the end, and a big gap
-		 * in the middle.
-		 */
-		if (!test_bit(tid, tidmap))
-			continue;
+	cnt = 0;
+	for_each_set_bit(tid, tidmap, limit) {
 		cnt++;
 		if (dd->pageshadow[ctxttid + tid]) {
 			struct page *p;
@@ -1948,9 +1936,7 @@ static int qib_user_event_ack(struct qib_ctxtdata *rcd, int subctxt,
 {
 	int ret = 0, i;
 
-	for (i = 0; i <= _QIB_MAX_EVENT_BIT; i++) {
-		if (!test_bit(i, &events))
-			continue;
+	for_each_set_bit(i, &events, _QIB_MAX_EVENT_BIT + 1) {
 		if (i == _QIB_EVENT_DISARM_BUFS_BIT) {
 			(void)qib_disarm_piobufs_ifneeded(rcd);
 			ret = disarm_req_delay(rcd);
diff --git a/drivers/infiniband/hw/qib/qib_tx.c b/drivers/infiniband/hw/qib/qib_tx.c
index 1bf626c..93d236a 100644
--- a/drivers/infiniband/hw/qib/qib_tx.c
+++ b/drivers/infiniband/hw/qib/qib_tx.c
@@ -82,7 +82,6 @@ int qib_disarm_piobufs_ifneeded(struct qib_ctxtdata *rcd)
 	struct qib_devdata *dd = rcd->dd;
 	unsigned i;
 	unsigned last;
-	unsigned n = 0;
 
 	last = rcd->pio_base + rcd->piocnt;
 	/*
@@ -101,11 +100,10 @@ int qib_disarm_piobufs_ifneeded(struct qib_ctxtdata *rcd)
 				  &rcd->user_event_mask[i]);
 	}
 	spin_lock_irq(&dd->pioavail_lock);
-	for (i = rcd->pio_base; i < last; i++) {
-		if (__test_and_clear_bit(i, dd->pio_need_disarm)) {
-			n++;
-			dd->f_sendctrl(rcd->ppd, QIB_SENDCTRL_DISARM_BUF(i));
-		}
+	i = rcd->pio_base;
+	for_each_set_bit_from(i, dd->pio_need_disarm, last) {
+		__clear_bit(i, dd->pio_need_disarm);
+		dd->f_sendctrl(rcd->ppd, QIB_SENDCTRL_DISARM_BUF(i));
 	}
 	spin_unlock_irq(&dd->pioavail_lock);
 	return 0;
@@ -178,10 +176,8 @@ void qib_disarm_piobufs_set(struct qib_devdata *dd, unsigned long *mask,
 	for (i = 0; i < dd->num_pports; i++)
 		pppd[i] = NULL;
 
-	for (i = 0; i < cnt; i++) {
+	for_each_set_bit(i, mask, cnt) {
 		int which;
-		if (!test_bit(i, mask))
-			continue;
 		/*
 		 * If the buffer is owned by the DMA hardware,
 		 * reset the DMA engine.
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
  2012-04-03  8:47 ` Akinobu Mita
@ 2012-04-03  8:47   ` Akinobu Mita
  -1 siblings, 0 replies; 12+ messages in thread
From: Akinobu Mita @ 2012-04-03  8:47 UTC (permalink / raw)
  To: linux-kernel, akpm
  Cc: Akinobu Mita, Sekhar Nori, Kevin Hilman,
	davinci-linux-open-source, Russell King, 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@linux.davincidsp.com
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@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] 12+ messages in thread

* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
@ 2012-04-03  8:47   ` Akinobu Mita
  0 siblings, 0 replies; 12+ 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] 12+ messages in thread

* [PATCH 4/4] ppp: use for_each_set_bit_from
  2012-04-03  8:47 ` Akinobu Mita
                   ` (2 preceding siblings ...)
  (?)
@ 2012-04-03  8:47 ` Akinobu Mita
  -1 siblings, 0 replies; 12+ messages in thread
From: Akinobu Mita @ 2012-04-03  8:47 UTC (permalink / raw)
  To: linux-kernel, akpm; +Cc: Akinobu Mita, Dmitry Kozlov, netdev

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: Dmitry Kozlov <xeb@mail.ru>
Cc: netdev@vger.kernel.org
---
 drivers/net/ppp/pptp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index 885dbdd..72b50f5 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -116,8 +116,8 @@ static int lookup_chan_dst(u16 call_id, __be32 d_addr)
 	int i;
 
 	rcu_read_lock();
-	for (i = find_next_bit(callid_bitmap, MAX_CALLID, 1); i < MAX_CALLID;
-	     i = find_next_bit(callid_bitmap, MAX_CALLID, i + 1)) {
+	i = 1;
+	for_each_set_bit_from(i, callid_bitmap, MAX_CALLID) {
 		sock = rcu_dereference(callid_sock[i]);
 		if (!sock)
 			continue;
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/4] arm: davinci: use for_each_set_bit_from
  2012-04-03  8:47   ` Akinobu Mita
@ 2012-04-10 16:42     ` Sekhar Nori
  -1 siblings, 0 replies; 12+ messages in thread
From: Sekhar Nori @ 2012-04-10 16:42 UTC (permalink / raw)
  To: Akinobu Mita
  Cc: linux-kernel, akpm, Kevin Hilman, davinci-linux-open-source,
	Russell King, 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@linux.davincidsp.com
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: linux-arm-kernel@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] 12+ messages in thread

* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
@ 2012-04-10 16:42     ` Sekhar Nori
  0 siblings, 0 replies; 12+ 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] 12+ messages in thread

* Re: [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; 12+ messages in thread
From: Akinobu Mita @ 2012-04-10 21:02 UTC (permalink / raw)
  To: Christian Riesch
  Cc: linux-kernel, akpm, Sekhar Nori, Kevin Hilman,
	davinci-linux-open-source, Russell King, 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@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] 12+ messages in thread

* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
@ 2012-04-10 21:02       ` Akinobu Mita
  0 siblings, 0 replies; 12+ 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] 12+ messages in thread

* Re: [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
  -1 siblings, 0 replies; 12+ messages in thread
From: Akinobu Mita @ 2012-04-10 21:08 UTC (permalink / raw)
  To: Sekhar Nori, Christian Riesch
  Cc: linux-kernel, akpm, Kevin Hilman, davinci-linux-open-source,
	Russell King, 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@linux.davincidsp.com
>> Cc: Russell King <linux@arm.linux.org.uk>
>> Cc: linux-arm-kernel@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] 12+ messages in thread

* [PATCH 3/4] arm: davinci: use for_each_set_bit_from
@ 2012-04-10 21:08       ` Akinobu Mita
  0 siblings, 0 replies; 12+ 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] 12+ messages in thread

end of thread, other threads:[~2012-04-10 21:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03  8:47 [PATCH 1/4] IB/ipath: use for_each_set_bit and for_each_set_bit_from Akinobu Mita
2012-04-03  8:47 ` Akinobu Mita
2012-04-03  8:47 ` [PATCH 2/4] IB/qib: " Akinobu Mita
2012-04-03  8:47 ` [PATCH 3/4] arm: davinci: use for_each_set_bit_from Akinobu Mita
2012-04-03  8:47   ` Akinobu Mita
2012-04-10 16:42   ` Sekhar Nori
2012-04-10 16:42     ` Sekhar Nori
2012-04-10 21:08     ` Akinobu Mita
2012-04-10 21:08       ` Akinobu Mita
     [not found]   ` <CABkLObr4Vyp9FwxfOquFjqnh1rEaLXNAzBV4SV-PO=UA4EC2vA@mail.gmail.com>
2012-04-10 21:02     ` Akinobu Mita
2012-04-10 21:02       ` Akinobu Mita
2012-04-03  8:47 ` [PATCH 4/4] ppp: " Akinobu Mita

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.