All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] dmatest: store correct thread count in dmatest_add_channel()
@ 2011-11-24 11:47 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2011-11-24 11:47 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dan Williams, linux-kernel, kernel-janitors

The original code added 1 to the thread_count, but the intent was to
add += cnt.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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",

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

end of thread, other threads:[~2012-01-10  7:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24 11:47 [patch] dmatest: store correct thread count in dmatest_add_channel() Dan Carpenter
2011-11-24 11:47 ` Dan Carpenter
2012-01-09 11:17 ` [patch] dmatest: store correct thread count in Dan Carpenter
2012-01-09 11:17   ` [patch] dmatest: store correct thread count in dmatest_add_channel() Dan Carpenter
2012-01-10  7:53   ` Dan Williams
2012-01-10  7:53     ` 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.