LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Anson Huang <anson.huang@nxp.com>,
	"rui.zhang@intel.com" <rui.zhang@intel.com>,
	"amit.kucheria@verdurent.com" <amit.kucheria@verdurent.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH 1/2] thermal: qoriq: Use devm_add_action_or_reset() to handle all cleanups
Date: Tue, 17 Mar 2020 10:07:24 +0100	[thread overview]
Message-ID: <a2b5e9e6-7564-f2c9-67ac-54e0d76f542e@linaro.org> (raw)
In-Reply-To: <DB3PR0402MB39168E9B3397BB0E7339802EF5F60@DB3PR0402MB3916.eurprd04.prod.outlook.com>

On 17/03/2020 02:14, Anson Huang wrote:
> Hi, Daniel
> 
>> Subject: RE: [PATCH 1/2] thermal: qoriq: Use devm_add_action_or_reset() to
>> handle all cleanups
>>

[ ... ]

>>>>> Is this change compatible with the tristate?
>>>>
>>>> I think so, any concern need me to double confirm?
>>>
>>> TBH, I discovered the function with your patch. My concern is if the
>>> callback is called when unloading the module.
>>
>> I think so as per my memory, see similar patches as below:
>>
>>
>> commit 19ec11a2233d24a7811836fa735203aaccf95a23
>> Author: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>> Date:   Thu Jul 11 10:29:35 2019 +0200
>>
>>     gpio: em: remove the gpiochip before removing the irq domain
>>
>>     In commit 8764c4ca5049 ("gpio: em: use the managed version of
>>     gpiochip_add_data()") we implicitly altered the ordering of resource
>>     freeing: since gpiochip_remove() calls gpiochip_irqchip_remove()
>>     internally, we now can potentially use the irq_domain after it was
>>     destroyed in the remove() callback (as devm resources are freed after
>>     remove() has returned).
>>
>>     Use devm_add_action_or_reset() to keep the ordering right and entirely
>>     kill the remove() callback in the driver.
>>
>>
>> commit d9aa5ca429ad30dde96e5966173d18004f16f312
>> Author: Alexandre Belloni <alexandre.belloni@bootlin.com>
>> Date:   Fri Apr 19 10:25:01 2019 +0200
>>
>>     rtc: ds2404: simplify .probe and remove .remove
>>
>>     Use devm_add_action_or_reset to simplify .probe and remove .remove
>>
>>     Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
>>
>> drivers/rtc/rtc-ds2404.c
> 
> Any further concern?

No more concerns, I've applied the patches.

Thanks
  -- Daniel


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


      reply	other threads:[~2020-03-17  9:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11  5:07 Anson Huang
2020-03-11  5:07 ` [PATCH 2/2] thermal: qoriq: Sort includes alphabetically Anson Huang
2020-03-11  8:57   ` Amit Kucheria
2020-03-11  8:59 ` [PATCH 1/2] thermal: qoriq: Use devm_add_action_or_reset() to handle all cleanups Amit Kucheria
2020-03-12 11:24 ` Daniel Lezcano
2020-03-12 11:47   ` Anson Huang
2020-03-12 11:56     ` Daniel Lezcano
2020-03-12 12:19       ` Anson Huang
2020-03-17  1:14         ` Anson Huang
2020-03-17  9:07           ` Daniel Lezcano [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=a2b5e9e6-7564-f2c9-67ac-54e0d76f542e@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amit.kucheria@verdurent.com \
    --cc=anson.huang@nxp.com \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --subject='Re: [PATCH 1/2] thermal: qoriq: Use devm_add_action_or_reset() to handle all cleanups' \
    /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

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