From: Scott Ellis <scott@jumpnowtek.com>
To: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>,
Russell King <linux@arm.linux.org.uk>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] DMA: OMAP: Remove extra looping from omap_request_dma
Date: Wed, 29 Jun 2011 10:09:09 -0400 [thread overview]
Message-ID: <1309356549.3995.13.camel@quad> (raw)
Break from dma channel search when a free one is found.
Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
---
arch/arm/plat-omap/dma.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c22217c..3d36fcf 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -678,10 +678,9 @@ int omap_request_dma(int dev_id, const char *dev_name,
spin_lock_irqsave(&dma_chan_lock, flags);
for (ch = 0; ch < dma_chan_count; ch++) {
- if (free_ch == -1 && dma_chan[ch].dev_id == -1) {
+ if (dma_chan[ch].dev_id == -1) {
free_ch = ch;
- if (dev_id == 0)
- break;
+ break;
}
}
if (free_ch == -1) {
WARNING: multiple messages have this Message-ID (diff)
From: scott@jumpnowtek.com (Scott Ellis)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] DMA: OMAP: Remove extra looping from omap_request_dma
Date: Wed, 29 Jun 2011 10:09:09 -0400 [thread overview]
Message-ID: <1309356549.3995.13.camel@quad> (raw)
Break from dma channel search when a free one is found.
Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
---
arch/arm/plat-omap/dma.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c22217c..3d36fcf 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -678,10 +678,9 @@ int omap_request_dma(int dev_id, const char *dev_name,
spin_lock_irqsave(&dma_chan_lock, flags);
for (ch = 0; ch < dma_chan_count; ch++) {
- if (free_ch == -1 && dma_chan[ch].dev_id == -1) {
+ if (dma_chan[ch].dev_id == -1) {
free_ch = ch;
- if (dev_id == 0)
- break;
+ break;
}
}
if (free_ch == -1) {
WARNING: multiple messages have this Message-ID (diff)
From: Scott Ellis <scott@jumpnowtek.com>
To: linux-omap@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Tony Lindgren <tony@atomide.com>,
Russell King <linux@arm.linux.org.uk>
Subject: [PATCH] DMA: OMAP: Remove extra looping from omap_request_dma
Date: Wed, 29 Jun 2011 10:09:09 -0400 [thread overview]
Message-ID: <1309356549.3995.13.camel@quad> (raw)
Break from dma channel search when a free one is found.
Signed-off-by: Scott Ellis <scott@jumpnowtek.com>
---
arch/arm/plat-omap/dma.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c22217c..3d36fcf 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -678,10 +678,9 @@ int omap_request_dma(int dev_id, const char *dev_name,
spin_lock_irqsave(&dma_chan_lock, flags);
for (ch = 0; ch < dma_chan_count; ch++) {
- if (free_ch == -1 && dma_chan[ch].dev_id == -1) {
+ if (dma_chan[ch].dev_id == -1) {
free_ch = ch;
- if (dev_id == 0)
- break;
+ break;
}
}
if (free_ch == -1) {
next reply other threads:[~2011-06-29 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-29 14:09 Scott Ellis [this message]
2011-06-29 14:09 ` [PATCH] DMA: OMAP: Remove extra looping from omap_request_dma Scott Ellis
2011-06-29 14:09 ` Scott Ellis
2011-07-01 7:19 ` Tony Lindgren
2011-07-01 7:19 ` Tony Lindgren
2011-07-01 10:54 ` Scott Ellis
2011-07-01 10:54 ` Scott Ellis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1309356549.3995.13.camel@quad \
--to=scott@jumpnowtek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.