public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-xenon: fix device_node_continue.cocci warnings
@ 2016-12-09 19:08 Julia Lawall
  2016-12-12  6:10 ` Ziji Hu
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2016-12-09 19:08 UTC (permalink / raw)
  To: Gregory CLEMENT
  Cc: Ulf Hansson, Adrian Hunter, linux-mmc, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Thomas Petazzoni, linux-arm-kernel,
	Ziji Hu, Jimmy Xu, Jisheng Zhang, Nadav Haklai, Ryan Gao,
	Doug Jones, Victor Gu, Wei(SOCP) Liu, Wilson Ding,
	Yehuda Yitschak, Marcin Wojtas, Hanna Hawa, Kostya Porotchkin,
	kbuild

Device node iterators put the previous value of the index variable, so an
explicit put causes a double put.

Generated by: scripts/coccinelle/iterators/device_node_continue.cocci

CC: Hu Ziji <huziji@marvell.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please check on this.  I have only seen the code shown below, but the rule
normally has a lot false positive rate.

url:
https://github.com/0day-ci/linux/commits/Gregory-CLEMENT/mmc-Add-support-to-Marvell-Xenon-SD-Host-Controller/20161210-002602
base:
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago


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

 sdhci-xenon.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/mmc/host/sdhci-xenon.c
+++ b/drivers/mmc/host/sdhci-xenon.c
@@ -423,7 +423,6 @@ static int xenon_child_node_of_parse(str
 				      MMC_CAP2_NO_SD |
 				      MMC_CAP2_NO_SDIO;
 		}
-		of_node_put(child);
 	}

 	return 0;

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

* Re: [PATCH] mmc: sdhci-xenon: fix device_node_continue.cocci warnings
  2016-12-09 19:08 [PATCH] mmc: sdhci-xenon: fix device_node_continue.cocci warnings Julia Lawall
@ 2016-12-12  6:10 ` Ziji Hu
  0 siblings, 0 replies; 2+ messages in thread
From: Ziji Hu @ 2016-12-12  6:10 UTC (permalink / raw)
  To: Julia Lawall, Gregory CLEMENT
  Cc: Ulf Hansson, Adrian Hunter, linux-mmc, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Thomas Petazzoni, linux-arm-kernel,
	Jimmy Xu, Jisheng Zhang, Nadav Haklai, Ryan Gao, Doug Jones,
	Victor Gu, Wei(SOCP) Liu, Wilson Ding, Yehuda Yitschak,
	Marcin Wojtas, Hanna Hawa, Kostya Porotchkin, kbuild-all

Hi Julia,

On 2016/12/10 3:08, Julia Lawall wrote:
> Device node iterators put the previous value of the index variable, so an
> explicit put causes a double put.
> 
> Generated by: scripts/coccinelle/iterators/device_node_continue.cocci
> 
> CC: Hu Ziji <huziji@marvell.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> ---
> 
> Please check on this.  I have only seen the code shown below, but the rule
> normally has a lot false positive rate.
> 

	Thank you.
	It seems that the check is right. I will correct it.

	Thank you.

Best regards,
Hu Ziji

> url:
> https://github.com/0day-ci/linux/commits/Gregory-CLEMENT/mmc-Add-support-to-Marvell-Xenon-SD-Host-Controller/20161210-002602
> base:
> :::::: branch date: 2 hours ago
> :::::: commit date: 2 hours ago
> 
> 
> Please take the patch only if it's a positive warning. Thanks!
> 
>  sdhci-xenon.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> --- a/drivers/mmc/host/sdhci-xenon.c
> +++ b/drivers/mmc/host/sdhci-xenon.c
> @@ -423,7 +423,6 @@ static int xenon_child_node_of_parse(str
>  				      MMC_CAP2_NO_SD |
>  				      MMC_CAP2_NO_SDIO;
>  		}
> -		of_node_put(child);
>  	}
> 
>  	return 0;
> 

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

end of thread, other threads:[~2016-12-12  6:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09 19:08 [PATCH] mmc: sdhci-xenon: fix device_node_continue.cocci warnings Julia Lawall
2016-12-12  6:10 ` Ziji Hu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox