linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&
@ 2020-01-20 12:58 Chen Zhou
  2020-01-21  2:54 ` Peng Ma
  2020-01-21  8:24 ` Vinod Koul
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Zhou @ 2020-01-20 12:58 UTC (permalink / raw)
  To: dan.j.williams, vkoul
  Cc: peng.ma, wen.he_1, jiaheng.fan, dmaengine, linux-kernel, chenzhou10

There is duplicated argument to && in function fsl_qdma_free_chan_resources,
which looks like a typo, pointer fsl_queue->desc_pool also needs NULL check,
fix it.
Detected with coccinelle.

Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs")
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 drivers/dma/fsl-qdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c
index 8979208..95cc025 100644
--- a/drivers/dma/fsl-qdma.c
+++ b/drivers/dma/fsl-qdma.c
@@ -304,7 +304,7 @@ static void fsl_qdma_free_chan_resources(struct dma_chan *chan)
 
 	vchan_dma_desc_free_list(&fsl_chan->vchan, &head);
 
-	if (!fsl_queue->comp_pool && !fsl_queue->comp_pool)
+	if (!fsl_queue->comp_pool && !fsl_queue->desc_pool)
 		return;
 
 	list_for_each_entry_safe(comp_temp, _comp_temp,
-- 
2.7.4


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

* RE: [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&
  2020-01-20 12:58 [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to && Chen Zhou
@ 2020-01-21  2:54 ` Peng Ma
  2020-01-21  3:28   ` Chen Zhou
  2020-01-21  8:24 ` Vinod Koul
  1 sibling, 1 reply; 4+ messages in thread
From: Peng Ma @ 2020-01-21  2:54 UTC (permalink / raw)
  To: Chen Zhou, dan.j.williams, vkoul; +Cc: dmaengine, linux-kernel



>-----Original Message-----
>From: Chen Zhou <chenzhou10@huawei.com>
>Sent: 2020年1月20日 20:59
>To: dan.j.williams@intel.com; vkoul@kernel.org
>Cc: Peng Ma <peng.ma@nxp.com>; Wen He <wen.he_1@nxp.com>;
>jiaheng.fan@nxp.com; dmaengine@vger.kernel.org;
>linux-kernel@vger.kernel.org; chenzhou10@huawei.com
>Subject: [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&
>
>There is duplicated argument to && in function fsl_qdma_free_chan_resources,
>which looks like a typo, pointer fsl_queue->desc_pool also needs NULL check,
>fix it.
>Detected with coccinelle.
>
What does the " coccinelle " mean here?

>Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for
>Layerscape SoCs")
>Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
>---
> drivers/dma/fsl-qdma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c index
>8979208..95cc025 100644
>--- a/drivers/dma/fsl-qdma.c
>+++ b/drivers/dma/fsl-qdma.c
>@@ -304,7 +304,7 @@ static void fsl_qdma_free_chan_resources(struct
>dma_chan *chan)
>
> 	vchan_dma_desc_free_list(&fsl_chan->vchan, &head);
>
>-	if (!fsl_queue->comp_pool && !fsl_queue->comp_pool)
>+	if (!fsl_queue->comp_pool && !fsl_queue->desc_pool)
> 		return;
>
Hi Chen,

Thanks very much for your patch, It is really need to check comp_pool and desc_pool here.
Reviewed-by: Peng Ma <peng.ma@nxp.com>
Tested-by: Peng Ma <peng.ma@nxp.com>

BR,
Peng
> 	list_for_each_entry_safe(comp_temp, _comp_temp,
>--
>2.7.4


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

* Re: [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&
  2020-01-21  2:54 ` Peng Ma
@ 2020-01-21  3:28   ` Chen Zhou
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Zhou @ 2020-01-21  3:28 UTC (permalink / raw)
  To: Peng Ma, dan.j.williams, vkoul; +Cc: dmaengine, linux-kernel

Hi Peng,

On 2020/1/21 10:54, Peng Ma wrote:
> 
> 
>> -----Original Message-----
>> From: Chen Zhou <chenzhou10@huawei.com>
>> Sent: 2020年1月20日 20:59
>> To: dan.j.williams@intel.com; vkoul@kernel.org
>> Cc: Peng Ma <peng.ma@nxp.com>; Wen He <wen.he_1@nxp.com>;
>> jiaheng.fan@nxp.com; dmaengine@vger.kernel.org;
>> linux-kernel@vger.kernel.org; chenzhou10@huawei.com
>> Subject: [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&
>>
>> There is duplicated argument to && in function fsl_qdma_free_chan_resources,
>> which looks like a typo, pointer fsl_queue->desc_pool also needs NULL check,
>> fix it.
>> Detected with coccinelle.
>>
> What does the " coccinelle " mean here?

The scripts in kernel dir, that is coccicheck.

Thanks,
Chen Zhou

> 
>> Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for
>> Layerscape SoCs")
>> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
>> ---
>> drivers/dma/fsl-qdma.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c index
>> 8979208..95cc025 100644
>> --- a/drivers/dma/fsl-qdma.c
>> +++ b/drivers/dma/fsl-qdma.c
>> @@ -304,7 +304,7 @@ static void fsl_qdma_free_chan_resources(struct
>> dma_chan *chan)
>>
>> 	vchan_dma_desc_free_list(&fsl_chan->vchan, &head);
>>
>> -	if (!fsl_queue->comp_pool && !fsl_queue->comp_pool)
>> +	if (!fsl_queue->comp_pool && !fsl_queue->desc_pool)
>> 		return;
>>
> Hi Chen,
> 
> Thanks very much for your patch, It is really need to check comp_pool and desc_pool here.
> Reviewed-by: Peng Ma <peng.ma@nxp.com>
> Tested-by: Peng Ma <peng.ma@nxp.com>
> 
> BR,
> Peng
>> 	list_for_each_entry_safe(comp_temp, _comp_temp,
>> --
>> 2.7.4
> 


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

* Re: [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&
  2020-01-20 12:58 [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to && Chen Zhou
  2020-01-21  2:54 ` Peng Ma
@ 2020-01-21  8:24 ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2020-01-21  8:24 UTC (permalink / raw)
  To: Chen Zhou
  Cc: dan.j.williams, peng.ma, wen.he_1, jiaheng.fan, dmaengine, linux-kernel

On 20-01-20, 20:58, Chen Zhou wrote:
> There is duplicated argument to && in function fsl_qdma_free_chan_resources,
> which looks like a typo, pointer fsl_queue->desc_pool also needs NULL check,
> fix it.
> Detected with coccinelle.

Applied, thanks

-- 
~Vinod

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

end of thread, other threads:[~2020-01-21  8:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-20 12:58 [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to && Chen Zhou
2020-01-21  2:54 ` Peng Ma
2020-01-21  3:28   ` Chen Zhou
2020-01-21  8:24 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).