mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Alexandru Ardelean <aardelean@deviqon.com>,
	mturquette@baylibre.com, sboyd@kernel.org
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org, pdeschrijver@nvidia.com,
	pgaikwad@nvidia.com, jonathanh@nvidia.com
Subject: Re: [PATCH] clk: tegra: clk-tegra124-dfll-fcpu: don't use devm functions for regulator
Date: Thu, 24 Jun 2021 13:57:08 +0200	[thread overview]
Message-ID: <YNRzFOIKtUZfnsu7@orome.fritz.box> (raw)
In-Reply-To: <20210624084737.42336-1-aardelean@deviqon.com>

[-- Attachment #1: Type: text/plain, Size: 1136 bytes --]

On Thu, Jun 24, 2021 at 11:47:37AM +0300, Alexandru Ardelean wrote:
> The purpose of the device-managed functions is to bind the life-time of an
> object to that of a parent device object.
> 
> This is not the case for the 'vdd-cpu' regulator in this driver. A
> reference is obtained via devm_regulator_get() and immediately released
> with devm_regulator_put().
> 
> In this case, the usage of devm_ functions is slightly excessive, as the
> un-managed versions of these functions is a little cleaner (and slightly
> more economical in terms of allocation).
> 
> This change converts the devm_regulator_{get,put}() to
> regulator_{get,put}() in the get_alignment_from_regulator() function of
> this driver.
> 
> Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
> ---
>  drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Indeed, this seems unnecessary:

Reviewed-by: Thierry Reding <treding@nvidia.com>

Mike, Stephen: do you want to pick this up directly or would you prefer
if I collected this into a clk branch for the next cycle?

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-06-24 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24  8:47 Alexandru Ardelean
2021-06-24 11:57 ` Thierry Reding [this message]
2021-06-25 23:23   ` Stephen Boyd
2021-06-25 23:23 ` Stephen Boyd

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=YNRzFOIKtUZfnsu7@orome.fritz.box \
    --to=thierry.reding@gmail.com \
    --cc=aardelean@deviqon.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=pgaikwad@nvidia.com \
    --cc=sboyd@kernel.org \
    /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®