All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleh Kravchenko <oleg@kaa.org.ua>
To: wangyufen <wangyufen@huawei.com>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH 02/13] leds: el15203000: Fix devm vs. non-devm ordering
Date: Wed, 9 Nov 2022 12:43:13 +0200	[thread overview]
Message-ID: <6D18A607-EC63-495F-BA2D-78E0DB056D3C@kaa.org.ua> (raw)
In-Reply-To: <bbd67e6a-8ce0-dbe8-6ab1-9d4a015f4ee9@huawei.com>



> 9 лист. 2022 р. о 12:25 wangyufen <wangyufen@huawei.com> написав(ла):
> 
> 
> 在 2022/11/9 17:39, Oleh Kravchenko 写道:
>> Hello all!
>> 
>>> 9 лист. 2022 р. о 10:48 Wang Yufen <wangyufen@huawei.com> написав(ла):
>>> 
>>> return el15203000_probe_dt(priv);
>>> }
>>> 
>>> -static void el15203000_remove(struct spi_device *spi)
>> Is remove() callback from struct spi_driver deprecated?
> 
> It is not that remove() callback is deprecated,
> it's that after wrapping mutex_destroy() call with devm_add_action_or_reset(),
> remove() callback is unnecessary here.

When remove() is called, the memory allocated by devm_*() is valid.
So what you try to fix here?

> 
>> 
>>> -{
>>> - struct el15203000 *priv = spi_get_drvdata(spi);
>>> -
>>> - mutex_destroy(&priv->lock);
>>> -}
>>> 
>>> static const struct of_device_id el15203000_dt_ids[] = {
>>> { .compatible = "crane,el15203000", },
>>> @@ -331,7 +336,6 @@ static void el15203000_remove(struct spi_device *spi)
>>> 
>>> static struct spi_driver el15203000_driver = {
>>> .probe = el15203000_probe,
>>> - .remove = el15203000_remove,
>>> .driver = {
>>> .name = KBUILD_MODNAME,
>>> .of_match_table = el15203000_dt_ids,
>>> -- 
>>> 1.8.3.1
>>> 
>> 


  reply	other threads:[~2022-11-09 10:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  8:48 [PATCH 00/13] leds: Fix devm vs. non-devm ordering Wang Yufen
2022-11-09  8:48 ` [PATCH 01/13] leds: cr0014114: " Wang Yufen
2022-11-09  8:48 ` [PATCH 02/13] leds: el15203000: " Wang Yufen
2022-11-09  9:39   ` Oleh Kravchenko
2022-11-09 10:25     ` wangyufen
2022-11-09 10:43       ` Oleh Kravchenko [this message]
     [not found]         ` <c53e4614-eb06-cda8-f9da-2ca58396df54@huawei.com>
2022-11-11 10:39           ` Oleh Kravchenko
2022-11-15  2:06             ` Wei Yongjun
2022-11-22  1:10               ` Wang Yufen
2022-11-25 22:21                 ` Oleh Kravchenko
2022-11-09  8:48 ` [PATCH 03/13] leds: lm3532: " Wang Yufen
2022-11-09  8:48 ` [PATCH 04/13] leds: lm3692x: " Wang Yufen
2022-11-09  8:48 ` [PATCH 05/13] leds: lm3697: " Wang Yufen
2022-11-09  8:48 ` [PATCH 06/13] leds: lp50xx: " Wang Yufen
2022-11-09  8:48 ` [PATCH 07/13] leds: lp8860: " Wang Yufen
2022-11-09  8:48 ` [PATCH 08/13] leds: mlxreg: " Wang Yufen
2022-11-09  8:48 ` [PATCH 09/13] leds: mt6323: " Wang Yufen
2022-11-09  8:48 ` [PATCH 10/13] leds: powernv: " Wang Yufen
2022-11-09  8:48 ` [PATCH 11/13] leds: sc27xx: " Wang Yufen
2022-11-09  8:48 ` [PATCH 12/13] leds: spi-byte: " Wang Yufen
2022-11-09  8:48 ` [PATCH 13/13] leds: rt8515: " Wang Yufen
2022-12-07 20:20 ` [PATCH 00/13] leds: " Pavel Machek
2022-12-08  2:23   ` wangyufen

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=6D18A607-EC63-495F-BA2D-78E0DB056D3C@kaa.org.ua \
    --to=oleg@kaa.org.ua \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=wangyufen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.