public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Subject: Re: [PATCH v1 1/1] clk: devres: Simplify devres handling functions
Date: Wed, 28 Aug 2024 22:13:25 +0300	[thread overview]
Message-ID: <Zs921Yj-lqg54wZs@smile.fi.intel.com> (raw)
In-Reply-To: <def27b96be1c2a8b84f83a55e310bf95.sboyd@kernel.org>

On Wed, Aug 28, 2024 at 11:39:51AM -0700, Stephen Boyd wrote:
> Quoting Andy Shevchenko (2024-08-28 06:08:20)
> > On Tue, Aug 27, 2024 at 05:19:04PM -0700, Stephen Boyd wrote:
> > > Quoting Andy Shevchenko (2024-08-22 08:58:22)

...

> > > > -       state = devres_alloc(devm_clk_release, sizeof(*state), GFP_KERNEL);
> > > > +       state = devm_kmalloc(dev, sizeof(*state), GFP_KERNEL);
> > > 
> > > When is this allocation freed if the get() fails? When the calling
> > > device driver detaches?
> > 
> > At device unbinding. Is it a problem?
> 
> It is a change, and the commit text said no functional change :(

Ah, I see. I think it's possible to actually make it happen that there will be
no dangling memory in case of failure. I'll think about that.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2024-08-28 19:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 15:58 [PATCH v1 1/1] clk: devres: Simplify devres handling functions Andy Shevchenko
2024-08-28  0:19 ` Stephen Boyd
2024-08-28 13:08   ` Andy Shevchenko
2024-08-28 18:39     ` Stephen Boyd
2024-08-28 19:13       ` Andy Shevchenko [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=Zs921Yj-lqg54wZs@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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