tree:   git://git.infradead.org/users/vkoul/slave-dma.git for-linus
head:   654fa24965aafcb4bb8a1a14400c5ecea3be76b6
commit: ebc6d2d9c8cd48c351da84dd467c0edddc149ded [55/57] dmaengine: shdma: 
Enable driver compilation with COMPILE_TEST

>> drivers/dma/sh/rcar-hpbdma.c:627:10-15: ERROR: iterator variable bound on 
>> line 626 cannot be NULL
--
>> drivers/dma/sh/shdma-base.c:812:7-12: ERROR: iterator variable bound on line 
>> 808 cannot be NULL
--
>> drivers/dma/sh/shdmac.c:581:10-15: ERROR: iterator variable bound on line 
>> 580 cannot be NULL
--
>> drivers/dma/sh/sudmac.c:303:10-15: ERROR: iterator variable bound on line 
>> 302 cannot be NULL

Please consider folding the attached diff :-)

---
0-DAY kernel build testing backend              Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation
From: Fengguang Wu <fengguang...@intel.com>
Subject: [PATCH] dmaengine: shdma: fix coccinelle warnings
TO: Vinod Koul <vinod.k...@intel.com>
CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: dmaeng...@vger.kernel.org 
CC: linux-ker...@vger.kernel.org 

drivers/dma/sh/rcar-hpbdma.c:627:10-15: ERROR: iterator variable bound on line 626 cannot be NULL

 Many iterators have the property that the first argument is always bound
 to a real list element, never NULL.

Semantic patch information:
 False positives arise for some iterators that do not have this property,
 or in cases when the loop cursor is reassigned.  The latter should only
 happen when the matched code is on the way to a loop exit (break, goto,
 or return).

Generated by: /kbuild/src/linux/scripts/coccinelle/iterators/itnull.cocci

CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: Vinod Koul <vinod.k...@intel.com>
Signed-off-by: Fengguang Wu <fengguang...@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 rcar-hpbdma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/dma/sh/rcar-hpbdma.c
+++ b/drivers/dma/sh/rcar-hpbdma.c
@@ -624,7 +624,7 @@ static void hpb_dmae_chan_remove(struct
 	int i;
 
 	shdma_for_each_chan(schan, &hpbdev->shdma_dev, i) {
-		BUG_ON(!schan);
+		BUG_ON(BAD(!schan));
 
 		shdma_chan_remove(schan);
 	}
From: Fengguang Wu <fengguang...@intel.com>
Subject: [PATCH] dmaengine: shdma: fix coccinelle warnings
TO: Vinod Koul <vinod.k...@intel.com>
CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: dmaeng...@vger.kernel.org 
CC: linux-ker...@vger.kernel.org 

drivers/dma/sh/shdma-base.c:812:7-12: ERROR: iterator variable bound on line 808 cannot be NULL

 Many iterators have the property that the first argument is always bound
 to a real list element, never NULL.

Semantic patch information:
 False positives arise for some iterators that do not have this property,
 or in cases when the loop cursor is reassigned.  The latter should only
 happen when the matched code is on the way to a loop exit (break, goto,
 or return).

Generated by: /kbuild/src/linux/scripts/coccinelle/iterators/itnull.cocci

CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: Vinod Koul <vinod.k...@intel.com>
Signed-off-by: Fengguang Wu <fengguang...@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 shdma-base.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -809,9 +809,6 @@ bool shdma_reset(struct shdma_dev *sdev)
 		struct shdma_desc *sdesc;
 		LIST_HEAD(dl);
 
-		if (!schan)
-			continue;
-
 		spin_lock(&schan->chan_lock);
 
 		/* Stop the channel */
From: Fengguang Wu <fengguang...@intel.com>
Subject: [PATCH] dmaengine: shdma: fix coccinelle warnings
TO: Vinod Koul <vinod.k...@intel.com>
CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: dmaeng...@vger.kernel.org 
CC: linux-ker...@vger.kernel.org 
CC: devicet...@vger.kernel.org 

drivers/dma/sh/shdmac.c:581:10-15: ERROR: iterator variable bound on line 580 cannot be NULL

 Many iterators have the property that the first argument is always bound
 to a real list element, never NULL.

Semantic patch information:
 False positives arise for some iterators that do not have this property,
 or in cases when the loop cursor is reassigned.  The latter should only
 happen when the matched code is on the way to a loop exit (break, goto,
 or return).

Generated by: /kbuild/src/linux/scripts/coccinelle/iterators/itnull.cocci

CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: Vinod Koul <vinod.k...@intel.com>
Signed-off-by: Fengguang Wu <fengguang...@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 shdmac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/dma/sh/shdmac.c
+++ b/drivers/dma/sh/shdmac.c
@@ -578,7 +578,7 @@ static void sh_dmae_chan_remove(struct s
 	int i;
 
 	shdma_for_each_chan(schan, &shdev->shdma_dev, i) {
-		BUG_ON(!schan);
+		BUG_ON(BAD(!schan));
 
 		shdma_chan_remove(schan);
 	}
From: Fengguang Wu <fengguang...@intel.com>
Subject: [PATCH] dmaengine: shdma: fix coccinelle warnings
TO: Vinod Koul <vinod.k...@intel.com>
CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: dmaeng...@vger.kernel.org 
CC: linux-ker...@vger.kernel.org 

drivers/dma/sh/sudmac.c:303:10-15: ERROR: iterator variable bound on line 302 cannot be NULL

 Many iterators have the property that the first argument is always bound
 to a real list element, never NULL.

Semantic patch information:
 False positives arise for some iterators that do not have this property,
 or in cases when the loop cursor is reassigned.  The latter should only
 happen when the matched code is on the way to a loop exit (break, goto,
 or return).

Generated by: /kbuild/src/linux/scripts/coccinelle/iterators/itnull.cocci

CC: Laurent Pinchart <laurent.pinchart+rene...@ideasonboard.com>
CC: Vinod Koul <vinod.k...@intel.com>
Signed-off-by: Fengguang Wu <fengguang...@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 sudmac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/dma/sh/sudmac.c
+++ b/drivers/dma/sh/sudmac.c
@@ -300,7 +300,7 @@ static void sudmac_chan_remove(struct su
 	int i;
 
 	shdma_for_each_chan(schan, &su_dev->shdma_dev, i) {
-		BUG_ON(!schan);
+		BUG_ON(BAD(!schan));
 
 		shdma_chan_remove(schan);
 	}
_______________________________________________
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild
_______________________________________________
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild

Reply via email to