Re: [PATCH] dmaengine: dmatest: fix thread_count

From: Dan Williams
Date: Thu Jan 26 2012 - 11:08:09 EST


On Thu, Jan 26, 2012 at 7:58 AM, Nicolas Ferre <nicolas.ferre@xxxxxxxxx> 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@xxxxxxxxx>
>
> Acked-by: Nicolas Ferre <nicolas.ferre@xxxxxxxxx>
>
>> ---
>>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/