From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: dan.j.williams@intel.com, maciej.sosnowski@intel.com,
linux-arm-kernel@lists.arm.linux.org.uk,
haavard.skinnemoen@atmel.com
Cc: patrice.vilchez@atmel.com, linux-kernel@vger.kernel.org,
nicolas.ferre@atmel.com
Subject: [PATCH] dmaengine: dmatest: correct thread_count while using multiple thread per channel
Date: Mon, 6 Jul 2009 18:19:44 +0200 [thread overview]
Message-ID: <1246897184-16833-1-git-send-email-nicolas.ferre@atmel.com> (raw)
It seems that thread_count is not properly calculated in dmatest.
In fact the thread count number that is returned from dmatest_add_threads() is
not correctly added to the thread_count and thus not properly printed.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
drivers/dma/dmatest.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 4262ff9..921c5f2 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -508,11 +508,11 @@ static int dmatest_add_channel(struct dma_chan *chan)
if (dma_has_cap(DMA_MEMCPY, dma_dev->cap_mask)) {
cnt = dmatest_add_threads(dtc, DMA_MEMCPY);
- thread_count += cnt > 0 ?: 0;
+ thread_count += cnt > 0 ? cnt : 0;
}
if (dma_has_cap(DMA_XOR, dma_dev->cap_mask)) {
cnt = dmatest_add_threads(dtc, DMA_XOR);
- thread_count += cnt > 0 ?: 0;
+ thread_count += cnt > 0 ? cnt : 0;
}
pr_info("dmatest: Started %u threads using %s\n",
--
1.5.3.7
next reply other threads:[~2009-07-06 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-06 16:19 Nicolas Ferre [this message]
2009-07-07 7:12 ` Haavard Skinnemoen
2009-07-07 14:24 ` Sosnowski, Maciej
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=1246897184-16833-1-git-send-email-nicolas.ferre@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=dan.j.williams@intel.com \
--cc=haavard.skinnemoen@atmel.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.sosnowski@intel.com \
--cc=patrice.vilchez@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®