mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: pierre kuo <vichy.kuo@gmail.com>
Cc: rafael@kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] driver core: platform: provide devm_platform_iounremap_resource
Date: Mon, 5 Oct 2020 17:31:43 +0200	[thread overview]
Message-ID: <20201005153143.GB2372768@kroah.com> (raw)
In-Reply-To: <CAOVJa8G+RMYvV6hU1cuJStRBM=7BbA7s1sXZavKs9OhHY8kaZw@mail.gmail.com>

On Mon, Oct 05, 2020 at 11:23:18PM +0800, pierre kuo wrote:
> hi Greg:
> > Why are you adding new functions but not actually calling them anywhere?
> 
> Below patch introduce a single helper, devm_platform_ioremap_resource,
> which combines
> platform_get_resource() and devm_ioremap_resource(). But there is no
> single helper to release
> those resources in driver removing stage.
> 
> https://lore.kernel.org/lkml/20190215152507.31066-2-brgl@bgdev.pl/
> 
> That means driver owner still need to call below (*) and (**) for
> releasing resource.
> Therefore, this patch adds a single release helper that can be paired with
> devm_platform_ioremap_resource.
> 
> Appreciate ur kind help,
> 
> foo_probe(pdev)
> {
>     iomem = devm_platform_ioremap_resource(pdev, 0);
>     ....
> }
> 
> 
> foo_remove(pdev)
> {
>     devm_iounmap(iomem);   (*)
>     devm_release_mem_region(dev, res->start, size); (**)
>    ........................
> }

I don't understand this at all, sorry.  Please submit your patch series,
with some drivers converted to use the new functions.  Otherwise we can
not properly review it.

thanks,

greg k-h

      reply	other threads:[~2020-10-05 15:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20 11:38 [PATCH 1/2] lib: devres: provide devm_iounremap_resource() pierre Kuo
2020-09-20 11:38 ` [PATCH 2/2] driver core: platform: provide devm_platform_iounremap_resource pierre Kuo
2020-09-29  6:21   ` pierre kuo
2020-10-02 13:45     ` Greg KH
2020-10-04 16:21       ` pierre kuo
2020-10-04 16:47         ` Greg KH
2020-10-05 15:23           ` pierre kuo
2020-10-05 15:31             ` Greg KH [this message]

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=20201005153143.GB2372768@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=vichy.kuo@gmail.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®