linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get()
@ 2020-10-31 10:54 Yu Kuai
  2020-11-09 13:12 ` yukuai (C)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yu Kuai @ 2020-10-31 10:54 UTC (permalink / raw)
  To: paul, harveyhuntnexus, miquel.raynal, vigneshr
  Cc: yukuai3, linux-mtd, linux-kernel, yi.zhang

of_find_device_by_node() already takes a reference to the device, and
ingenic_ecc_release() will drop the reference. So, the get_device() in
ingenic_ecc_get() is redundand.

Fixes: 15de8c6efd0e("mtd: rawnand: ingenic: Separate top-level and SoC specific code")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 drivers/mtd/nand/raw/ingenic/ingenic_ecc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
index 8e22cd6ec71f..efe0ffe4f1ab 100644
--- a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
+++ b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
@@ -71,8 +71,6 @@ static struct ingenic_ecc *ingenic_ecc_get(struct device_node *np)
 	if (!pdev || !platform_get_drvdata(pdev))
 		return ERR_PTR(-EPROBE_DEFER);
 
-	get_device(&pdev->dev);
-
 	ecc = platform_get_drvdata(pdev);
 	clk_prepare_enable(ecc->clk);
 
-- 
2.25.4


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get()
  2020-10-31 10:54 [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get() Yu Kuai
@ 2020-11-09 13:12 ` yukuai (C)
  2020-11-10  8:38 ` Paul Cercueil
  2020-11-19 21:11 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: yukuai (C) @ 2020-11-09 13:12 UTC (permalink / raw)
  To: paul, harveyhuntnexus, miquel.raynal, vigneshr
  Cc: linux-mtd, linux-kernel, yi.zhang

ping..

On 2020/10/31 18:54, Yu Kuai wrote:
> of_find_device_by_node() already takes a reference to the device, and
> ingenic_ecc_release() will drop the reference. So, the get_device() in
> ingenic_ecc_get() is redundand.
> 
> Fixes: 15de8c6efd0e("mtd: rawnand: ingenic: Separate top-level and SoC specific code")
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
>   drivers/mtd/nand/raw/ingenic/ingenic_ecc.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
> index 8e22cd6ec71f..efe0ffe4f1ab 100644
> --- a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
> +++ b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
> @@ -71,8 +71,6 @@ static struct ingenic_ecc *ingenic_ecc_get(struct device_node *np)
>   	if (!pdev || !platform_get_drvdata(pdev))
>   		return ERR_PTR(-EPROBE_DEFER);
>   
> -	get_device(&pdev->dev);
> -
>   	ecc = platform_get_drvdata(pdev);
>   	clk_prepare_enable(ecc->clk);
>   
> 

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get()
  2020-10-31 10:54 [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get() Yu Kuai
  2020-11-09 13:12 ` yukuai (C)
@ 2020-11-10  8:38 ` Paul Cercueil
  2020-11-19 21:11 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Cercueil @ 2020-11-10  8:38 UTC (permalink / raw)
  To: Yu Kuai
  Cc: vigneshr, yi.zhang, linux-kernel, harveyhuntnexus, linux-mtd,
	miquel.raynal

Hi,

Le sam. 31 oct. 2020 à 18:54, Yu Kuai <yukuai3@huawei.com> a écrit :
> of_find_device_by_node() already takes a reference to the device, and
> ingenic_ecc_release() will drop the reference. So, the get_device() in
> ingenic_ecc_get() is redundand.
> 
> Fixes: 15de8c6efd0e("mtd: rawnand: ingenic: Separate top-level and 
> SoC specific code")
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>

Acked-by: Paul Cercueil <paul@crapouillou.net>

Thanks,
-Paul

> ---
>  drivers/mtd/nand/raw/ingenic/ingenic_ecc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c 
> b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
> index 8e22cd6ec71f..efe0ffe4f1ab 100644
> --- a/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
> +++ b/drivers/mtd/nand/raw/ingenic/ingenic_ecc.c
> @@ -71,8 +71,6 @@ static struct ingenic_ecc *ingenic_ecc_get(struct 
> device_node *np)
>  	if (!pdev || !platform_get_drvdata(pdev))
>  		return ERR_PTR(-EPROBE_DEFER);
> 
> -	get_device(&pdev->dev);
> -
>  	ecc = platform_get_drvdata(pdev);
>  	clk_prepare_enable(ecc->clk);
> 
> --
> 2.25.4
> 



______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

* Re: [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get()
  2020-10-31 10:54 [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get() Yu Kuai
  2020-11-09 13:12 ` yukuai (C)
  2020-11-10  8:38 ` Paul Cercueil
@ 2020-11-19 21:11 ` Miquel Raynal
  2 siblings, 0 replies; 4+ messages in thread
From: Miquel Raynal @ 2020-11-19 21:11 UTC (permalink / raw)
  To: Yu Kuai, paul, harveyhuntnexus, miquel.raynal, vigneshr
  Cc: linux-mtd, linux-kernel, yi.zhang

On Sat, 2020-10-31 at 10:54:39 UTC, Yu Kuai wrote:
> of_find_device_by_node() already takes a reference to the device, and
> ingenic_ecc_release() will drop the reference. So, the get_device() in
> ingenic_ecc_get() is redundand.
> 
> Fixes: 15de8c6efd0e("mtd: rawnand: ingenic: Separate top-level and SoC specific code")
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> Acked-by: Paul Cercueil <paul@crapouillou.net>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

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

end of thread, other threads:[~2020-11-19 21:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 10:54 [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get() Yu Kuai
2020-11-09 13:12 ` yukuai (C)
2020-11-10  8:38 ` Paul Cercueil
2020-11-19 21:11 ` Miquel Raynal

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).