All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: dmatest: fix thread_count
@ 2012-01-26 15:33 Danny Kukawka
  2012-01-26 15:58 ` Nicolas Ferre
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Kukawka @ 2012-01-26 15:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: Haavard Skinnemoen, Dan Williams, Nicolas Ferre

It seems with commit f1aef8b6e6abf32a3a269542f95a19e2cb319f6c
another case where thread_count wasn't calculated correctly
has been overlooked.

This fix also a -Wparentheses compiler warning.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
---
 drivers/dma/dmatest.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 2b8661b..24225f0 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -599,7 +599,7 @@ static int dmatest_add_channel(struct dma_chan *chan)
 	}
 	if (dma_has_cap(DMA_PQ, dma_dev->cap_mask)) {
 		cnt = dmatest_add_threads(dtc, DMA_PQ);
-		thread_count += cnt > 0 ?: 0;
+		thread_count += cnt > 0 ? cnt : 0;
 	}
 
 	pr_info("dmatest: Started %u threads using %s\n",
-- 
1.7.7.3


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

end of thread, other threads:[~2012-01-26 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-26 15:33 [PATCH] dmaengine: dmatest: fix thread_count Danny Kukawka
2012-01-26 15:58 ` Nicolas Ferre
2012-01-26 16:07   ` Dan Williams

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.