Skip to contentSkip to conversation

dmaengine: fsl-qdma: fix duplicated argument to &&

PATCH Applied Chen Zhou 3 participants 4 messages Jan 20, 2020 – Jan 21, 2020 dmaengine

lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 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.

Fixes b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs")
---
 drivers/dma/fsl-qdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/fsl-qdma.c +1 -1
index 8979208..95cc025 100644
@@ -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,
Signature · 1 line
2.7.4
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Chen Zhou <[email protected]>
Sent: 2020年1月20日 20:59
To: [email protected]; [email protected]
Cc: Peng Ma <[email protected]>; Wen He <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&

Quoted 5 lines

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?

Quoted 12 lines
Fixes b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for

Layerscape SoCs")

---
drivers/dma/fsl-qdma.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/fsl-qdma.c index renamed from drivers/dma/fsl-qdma.c +0 -0

8979208..95cc025 100644

drivers/dma/fsl-qdma.c static void fsl_qdma_free_chan_resources(struct · line 310

Quoted 8 lines
drivers/dma/fsl-qdma.c +1 -1
@@ -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.

BR,
Peng

Quoted 3 lines

list_for_each_entry_safe(comp_temp, _comp_temp,
--
2.7.4

author
#2 lore raw

Hi Peng,

Quoted 11 lines · Peng Ma
Quoted 11 lines

-----Original Message-----
From: Chen Zhou <[email protected]>
Sent: 2020年1月20日 20:59
To: [email protected]; [email protected]
Cc: Peng Ma <[email protected]>; Wen He <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]
Subject: [PATCH -next] dmaengine: fsl-qdma: fix duplicated argument to &&

Quoted 6 lines
Quoted 5 lines

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

Quoted 33 lines
Quoted 13 lines
Fixes b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for

Layerscape SoCs")

---
drivers/dma/fsl-qdma.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/fsl-qdma.c index renamed from drivers/dma/fsl-qdma.c +0 -0

8979208..95cc025 100644

drivers/dma/fsl-qdma.c static void fsl_qdma_free_chan_resources(struct · line 310

Quoted 8 lines
drivers/dma/fsl-qdma.c +1 -1
@@ -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.

BR,
Peng

Quoted 3 lines

list_for_each_entry_safe(comp_temp, _comp_temp,
--
2.7.4

maintainer Applied
#3 lore raw
In reply to Chen Zhou
Quoted 4 lines · Chen Zhou

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

Signature · 1 line
~Vinod