mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Yu Kuai <yukuai3@huawei.com>
Cc: harveyhuntnexus@gmail.com, miquel.raynal@bootlin.com,
	vigneshr@ti.com, linux-mtd@lists.infradead.org,
	linux-kernel@vger.kernel.org, yi.zhang@huawei.com
Subject: Re: [PATCH] mtd: rawnand: ingenic: remove redundant get_device() in ingenic_ecc_get()
Date: Tue, 10 Nov 2020 08:38:24 +0000	[thread overview]
Message-ID: <00OKJQ.IYM95XDRFCZI3@crapouillou.net> (raw)
In-Reply-To: <20201031105439.2304211-1-yukuai3@huawei.com>

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
> 



  parent reply	other threads:[~2020-11-10  8:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-31 10:54 Yu Kuai
2020-11-09 13:12 ` yukuai (C)
2020-11-10  8:38 ` Paul Cercueil [this message]
2020-11-19 21:11 ` Miquel Raynal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00OKJQ.IYM95XDRFCZI3@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=harveyhuntnexus@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=vigneshr@ti.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®