Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread Christophe Leroy
Le 12/03/2024 à 16:30, George Stark a écrit : > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Hello Christophe > > On 3/12/24 14:51, Christophe Leroy wrote: >> >> >> Le 12

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread George Stark
Hello Christophe On 3/12/24 14:51, Christophe Leroy wrote: Le 12/03/2024 à 12:39, George Stark a écrit : [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] ... You don't need that

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread Christophe Leroy
Le 12/03/2024 à 12:39, George Stark a écrit : > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Hello Christophe > > Thanks for the review > You were right about typecheck -

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread George Stark
Hello Christophe Thanks for the review You were right about typecheck - it was meant to check errors even if CONFIG_DEBUG_MUTEXES was off. Here's new version based on the comments: diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 67edc4ca2bee..9193b163038f 100644 --- a/include

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread Andy Shevchenko
On Tue, Mar 12, 2024 at 7:41 AM Christophe Leroy wrote: > Le 12/03/2024 à 01:01, George Stark a écrit : > > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > > Découvrez pourquoi ceci est important à > > https://aka.ms/LearnAboutSenderIdentification ] > > On 3/7/24 13:34, A

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread Christophe Leroy
Le 12/03/2024 à 00:47, George Stark a écrit : > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Hello Waiman, Marek > > Thanks for the review. > > I've never used lockdep f

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread Christophe Leroy
Le 12/03/2024 à 02:10, Waiman Long a écrit : > On 3/11/24 19:47, George Stark wrote: >> Hello Waiman, Marek >> >> Thanks for the review. >> >> I've never used lockdep for debug but it seems preferable to >> keep that feature working. It could be look like this: >> >> diff --git a/include/linux/mu

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread Christophe Leroy
Le 12/03/2024 à 01:01, George Stark a écrit : > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Hello Andy > > On 3/7/24 13:34, Andy Shevchenko wrote: >> On Thu, Mar 7, 2024

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread Waiman Long
On 3/11/24 19:47, George Stark wrote: Hello Waiman, Marek Thanks for the review. I've never used lockdep for debug but it seems preferable to keep that feature working. It could be look like this: diff --git a/include/linux/mutex.h b/include/linux/mutex.h index f7611c092db7..574f6de6084d 10064

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread George Stark
Hello Andy On 3/7/24 13:34, Andy Shevchenko wrote: On Thu, Mar 7, 2024 at 4:40 AM George Stark wrote: Using of devm API leads to a certain order of releasing resources. So all dependent resources which are not devm-wrapped should be deleted with respect to devm-release order. Mutex is one of

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread George Stark
Hello Waiman, Marek Thanks for the review. I've never used lockdep for debug but it seems preferable to keep that feature working. It could be look like this: diff --git a/include/linux/mutex.h b/include/linux/mutex.h index f7611c092db7..574f6de6084d 100644 --- a/include/linux/mutex.h +++ b/in

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread George Stark
Hello Christophe On 3/7/24 16:50, Christophe Leroy wrote: Le 07/03/2024 à 03:40, George Stark a écrit : [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] Using of devm API leads to

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-07 Thread Marek Behún
On Thu, 7 Mar 2024 08:39:46 -0500 Waiman Long wrote: > On 3/7/24 04:56, Marek Behún wrote: > > On Thu, Mar 07, 2024 at 05:40:26AM +0300, George Stark wrote: > >> Using of devm API leads to a certain order of releasing resources. > >> So all dependent resources which are not devm-wrapped should

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-07 Thread Christophe Leroy
Le 07/03/2024 à 03:40, George Stark a écrit : > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Using of devm API leads to a certain order of releasing resources. > So all de

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-07 Thread Waiman Long
On 3/7/24 04:56, Marek Behún wrote: On Thu, Mar 07, 2024 at 05:40:26AM +0300, George Stark wrote: Using of devm API leads to a certain order of releasing resources. So all dependent resources which are not devm-wrapped should be deleted with respect to devm-release order. Mutex is one of such ob

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-07 Thread Andy Shevchenko
On Thu, Mar 7, 2024 at 4:40 AM George Stark wrote: > > Using of devm API leads to a certain order of releasing resources. > So all dependent resources which are not devm-wrapped should be deleted > with respect to devm-release order. Mutex is one of such objects that > often is bound to other reso

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-07 Thread Marek Behún
On Thu, Mar 07, 2024 at 05:40:26AM +0300, George Stark wrote: > Using of devm API leads to a certain order of releasing resources. > So all dependent resources which are not devm-wrapped should be deleted > with respect to devm-release order. Mutex is one of such objects that > often is bound to ot

[PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-06 Thread George Stark
Using of devm API leads to a certain order of releasing resources. So all dependent resources which are not devm-wrapped should be deleted with respect to devm-release order. Mutex is one of such objects that often is bound to other resources and has no own devm wrapping. Since mutex_destroy() actu