[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4cc76f3a-dc64-4146-b8d6-761386a4abde@salutedevices.com>
Date: Wed, 28 Feb 2024 03:27:04 +0300
From: George Stark <gnstark@...utedevices.com>
To: <andy.shevchenko@...il.com>, Marek Behún
<kabel@...nel.org>
CC: <linux-kernel@...r.kernel.org>, Hans de Goede <hdegoede@...hat.com>, Matti
Vaittinen <mazziesaccount@...il.com>, Linus Walleij
<linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>, Lucas De
Marchi <lucas.demarchi@...el.com>, Oded Gabbay <ogabbay@...nel.org>,
Thomas Hellström <thomas.hellstrom@...ux.intel.com>, Maarten
Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard
<mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, David Airlie
<airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>, Aleksandr Mezin
<mezin.alexander@...il.com>, Jean Delvare <jdelvare@...e.com>, Guenter Roeck
<linux@...ck-us.net>, Pavel Machek <pavel@....cz>, Lee Jones
<lee@...nel.org>, Sebastian Reichel <sre@...nel.org>, Matthias Brugger
<matthias.bgg@...il.com>, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, <linux-gpio@...r.kernel.org>,
<intel-xe@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
<linux-hwmon@...r.kernel.org>, <linux-leds@...r.kernel.org>,
<linux-pm@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>, "kernel@...utedevices.com"
<kernel@...utedevices.com>
Subject: Re: [PATCH 1/2] devm-helpers: Add resource managed version of mutex
init
On 2/23/24 15:26, Marek Behún wrote:
> On Thu, 22 Feb 2024 23:42:11 +0200
> andy.shevchenko@...il.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
Powered by blists - more mailing lists