From: George Stark <gnstark@salutedevices.com>
To: andy.shevchenko@gmail.com, "Marek Behún" <kabel@kernel.org>
Cc: linux-kernel@vger.kernel.org,
"Hans de Goede" <hdegoede@redhat.com>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Lucas De Marchi" <lucas.demarchi@intel.com>,
"Oded Gabbay" <ogabbay@kernel.org>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Aleksandr Mezin" <mezin.alexander@gmail.com>,
"Jean Delvare" <jdelvare@suse.com>,
"Guenter Roeck" <linux@roeck-us.net>,
"Pavel Machek" <pavel@ucw.cz>, "Lee Jones" <lee@kernel.org>,
"Sebastian Reichel" <sre@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
linux-gpio@vger.kernel.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-hwmon@vger.kernel.org,
linux-leds@vger.kernel.org, linux-pm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
"kernel@salutedevices.com" <kernel@salutedevices.com>
Subject: Re: [PATCH 1/2] devm-helpers: Add resource managed version of mutex init
Date: Wed, 28 Feb 2024 03:27:04 +0300 [thread overview]
Message-ID: <4cc76f3a-dc64-4146-b8d6-761386a4abde@salutedevices.com> (raw)
In-Reply-To: <20240223132641.3e2ba16c@dellmb>
On 2/23/24 15:26, Marek Behún wrote:
> On Thu, 22 Feb 2024 23:42:11 +0200
> andy.shevchenko@gmail.com wrote:
>
>> Thu, Feb 22, 2024 at 03:58:37PM +0100, Marek Behún kirjoitti:
>>> A few drivers are doing resource-managed mutex initialization by
>>> implementing ad-hoc one-liner mutex dropping functions and using them
>>> with devm_add_action_or_reset(). Help drivers avoid these repeated
>>> one-liners by adding managed version of mutex initialization.
>>>
>>> Use the new function devm_mutex_init() in the following drivers:
>>> drivers/gpio/gpio-pisosr.c
>>> drivers/gpio/gpio-sim.c
>>> drivers/gpu/drm/xe/xe_hwmon.c
>>> drivers/hwmon/nzxt-smart2.c
>>> drivers/leds/leds-is31fl319x.c
>>> drivers/power/supply/mt6370-charger.c
>>> drivers/power/supply/rt9467-charger.c
>>
>> Pardon me, but why?
>>
>> https://lore.kernel.org/linux-leds/20231214173614.2820929-1-gnstark@salutedevices.com/
>>
>> Can you cooperate, folks, instead of doing something independently?
Hello Andy
Thanks for pointing to my patch series
>
> Thanks Andy for pointing to George's patch series.
>
> I can drop the mutex_init() part and add just the debugfs part.
Hello Marek
I started to propose devm_mutex_init in December 2023. We tried to put
it in devm-helpers.h firstly then we came to conclusion that
linux/mutex.h would be a better place for it. Now I'm waiting for this
series [1] to be merged because my patch depends on it. I'll let you
know when I have an update.
[1]
https://lore.kernel.org/lkml/20240222150540.79981-2-longman@redhat.com/T/
>
> Marek
--
Best regards
George
prev parent reply other threads:[~2024-02-28 0:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 14:58 [PATCH 1/2] devm-helpers: Add resource managed version of mutex init Marek Behún
2024-02-22 15:11 ` Bartosz Golaszewski
2024-02-22 15:24 ` Guenter Roeck
2024-02-22 16:03 ` Guenter Roeck
2024-02-22 16:44 ` Matthew Auld
2024-02-22 18:33 ` Hans de Goede
2024-02-22 21:42 ` andy.shevchenko
2024-02-23 12:26 ` Marek Behún
2024-02-28 0:27 ` George Stark [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=4cc76f3a-dc64-4146-b8d6-761386a4abde@salutedevices.com \
--to=gnstark@salutedevices.com \
--cc=airlied@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=brgl@bgdev.pl \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jdelvare@suse.com \
--cc=kabel@kernel.org \
--cc=kernel@salutedevices.com \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mazziesaccount@gmail.com \
--cc=mezin.alexander@gmail.com \
--cc=mripard@kernel.org \
--cc=ogabbay@kernel.org \
--cc=pavel@ucw.cz \
--cc=sre@kernel.org \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tzimmermann@suse.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).