* [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
* Re: [PATCH] dmaengine: dmatest: fix thread_count
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
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Ferre @ 2012-01-26 15:58 UTC (permalink / raw)
To: Danny Kukawka; +Cc: linux-kernel, Haavard Skinnemoen, Dan Williams
On 01/26/2012 04:33 PM, Danny Kukawka :
> 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>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> 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",
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: dmatest: fix thread_count
2012-01-26 15:58 ` Nicolas Ferre
@ 2012-01-26 16:07 ` Dan Williams
0 siblings, 0 replies; 3+ messages in thread
From: Dan Williams @ 2012-01-26 16:07 UTC (permalink / raw)
To: Nicolas Ferre; +Cc: Danny Kukawka, linux-kernel, Haavard Skinnemoen
On Thu, Jan 26, 2012 at 7:58 AM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> On 01/26/2012 04:33 PM, Danny Kukawka :
>> 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>
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
>
>> ---
>> 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",
Thanks,
Already queued up, but maybe I'll append another Reported-by before
sending it up.
http://git.kernel.org/?p=linux/kernel/git/djbw/dmaengine.git;a=commitdiff;h=d07a74a546981a09ba490936645fbf0d1340b96c
--
Dan
^ permalink raw reply [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.