[PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()

Paul E. McKenney posted 12 patches 8 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()
Posted by Paul E. McKenney 8 months, 3 weeks ago
Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
happened had I thought a bit harder a few months ago.  Therefore, mark
them deprecated.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 7b28ad3317427..de8ed5efc5b16 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -838,6 +838,8 @@ our %deprecated_apis = (
 	"kunmap"				=> "kunmap_local",
 	"kmap_atomic"				=> "kmap_local_page",
 	"kunmap_atomic"				=> "kunmap_local",
+	"srcu_read_lock_lite"			=> "srcu_read_lock_fast",
+	"srcu_read_unlock_lite"			=> "srcu_read_unlock_fast",
 );
 
 #Create a search pattern for all these strings to speed up a loop below
-- 
2.40.1
Re: [PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()
Posted by Joe Perches 8 months, 3 weeks ago
On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
> served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
> As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
> happened had I thought a bit harder a few months ago.  Therefore, mark
> them deprecated.

Would it be better to convert the 3 existing instances?

> 
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> ---
>  scripts/checkpatch.pl | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 7b28ad3317427..de8ed5efc5b16 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -838,6 +838,8 @@ our %deprecated_apis = (
>  	"kunmap"				=> "kunmap_local",
>  	"kmap_atomic"				=> "kmap_local_page",
>  	"kunmap_atomic"				=> "kunmap_local",
> +	"srcu_read_lock_lite"			=> "srcu_read_lock_fast",
> +	"srcu_read_unlock_lite"			=> "srcu_read_unlock_fast",
>  );
>  
>  #Create a search pattern for all these strings to speed up a loop below
Re: [PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()
Posted by Paul E. McKenney 8 months, 3 weeks ago
On Mon, Mar 31, 2025 at 11:53:25PM -0700, Joe Perches wrote:
> On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> > Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
> > served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
> > As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
> > happened had I thought a bit harder a few months ago.  Therefore, mark
> > them deprecated.
> 
> Would it be better to convert the 3 existing instances?

Both are needed.  The point of these checkpatch.pl changes is to prevent
other instances from being added.

							Thanx, Paul

> > Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
> > ---
> >  scripts/checkpatch.pl | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index 7b28ad3317427..de8ed5efc5b16 100755
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -838,6 +838,8 @@ our %deprecated_apis = (
> >  	"kunmap"				=> "kunmap_local",
> >  	"kmap_atomic"				=> "kmap_local_page",
> >  	"kunmap_atomic"				=> "kunmap_local",
> > +	"srcu_read_lock_lite"			=> "srcu_read_lock_fast",
> > +	"srcu_read_unlock_lite"			=> "srcu_read_unlock_fast",
> >  );
> >  
> >  #Create a search pattern for all these strings to speed up a loop below
> 
>
Re: [PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()
Posted by Joe Perches 8 months, 3 weeks ago
On Tue, 2025-04-01 at 07:05 -0700, Paul E. McKenney wrote:
> On Mon, Mar 31, 2025 at 11:53:25PM -0700, Joe Perches wrote:
> > On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> > > Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
> > > served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
> > > As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
> > > happened had I thought a bit harder a few months ago.  Therefore, mark
> > > them deprecated.
> > 
> > Would it be better to convert the 3 existing instances?
> 
> Both are needed.  The point of these checkpatch.pl changes is to prevent
> other instances from being added.

If those are changed, why not remove the prototypes & functions too?
That would stop more instances being added no?
Re: [PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()
Posted by Paul E. McKenney 8 months, 3 weeks ago
On Tue, Apr 01, 2025 at 08:48:44PM -0700, Joe Perches wrote:
> On Tue, 2025-04-01 at 07:05 -0700, Paul E. McKenney wrote:
> > On Mon, Mar 31, 2025 at 11:53:25PM -0700, Joe Perches wrote:
> > > On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> > > > Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
> > > > served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
> > > > As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
> > > > happened had I thought a bit harder a few months ago.  Therefore, mark
> > > > them deprecated.
> > > 
> > > Would it be better to convert the 3 existing instances?
> > 
> > Both are needed.  The point of these checkpatch.pl changes is to prevent
> > other instances from being added.
> 
> If those are changed, why not remove the prototypes & functions too?
> That would stop more instances being added no?

Deprecating it for a cycle then removing the prototypes and functions
seems a bit more friendly to me.

							Thanx, Paul
Re: [PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()
Posted by Joe Perches 8 months, 3 weeks ago
On Tue, 2025-04-01 at 21:23 -0700, Paul E. McKenney wrote:
> On Tue, Apr 01, 2025 at 08:48:44PM -0700, Joe Perches wrote:
> > On Tue, 2025-04-01 at 07:05 -0700, Paul E. McKenney wrote:
> > > On Mon, Mar 31, 2025 at 11:53:25PM -0700, Joe Perches wrote:
> > > > On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> > > > > Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
> > > > > served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
> > > > > As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
> > > > > happened had I thought a bit harder a few months ago.  Therefore, mark
> > > > > them deprecated.
> > > > 
> > > > Would it be better to convert the 3 existing instances?
> > > 
> > > Both are needed.  The point of these checkpatch.pl changes is to prevent
> > > other instances from being added.
> > 
> > If those are changed, why not remove the prototypes & functions too?
> > That would stop more instances being added no?
> 
> Deprecating it for a cycle then removing the prototypes and functions
> seems a bit more friendly to me.

OK, please remember to push a checkpatch revert or equivalent
when it's done.  Thanks.
Re: [PATCH v2 10/12] checkpatch: Deprecate srcu_read_lock_lite() and srcu_read_unlock_lite()
Posted by Paul E. McKenney 8 months, 3 weeks ago
On Tue, Apr 01, 2025 at 09:49:11PM -0700, Joe Perches wrote:
> On Tue, 2025-04-01 at 21:23 -0700, Paul E. McKenney wrote:
> > On Tue, Apr 01, 2025 at 08:48:44PM -0700, Joe Perches wrote:
> > > On Tue, 2025-04-01 at 07:05 -0700, Paul E. McKenney wrote:
> > > > On Mon, Mar 31, 2025 at 11:53:25PM -0700, Joe Perches wrote:
> > > > > On Mon, 2025-03-31 at 14:03 -0700, Paul E. McKenney wrote:
> > > > > > Uses of srcu_read_lock_lite() and srcu_read_unlock_lite() are better
> > > > > > served by the new srcu_read_lock_fast() and srcu_read_unlock_fast() APIs.
> > > > > > As in srcu_read_lock_lite() and srcu_read_unlock_lite() would never have
> > > > > > happened had I thought a bit harder a few months ago.  Therefore, mark
> > > > > > them deprecated.
> > > > > 
> > > > > Would it be better to convert the 3 existing instances?
> > > > 
> > > > Both are needed.  The point of these checkpatch.pl changes is to prevent
> > > > other instances from being added.
> > > 
> > > If those are changed, why not remove the prototypes & functions too?
> > > That would stop more instances being added no?
> > 
> > Deprecating it for a cycle then removing the prototypes and functions
> > seems a bit more friendly to me.
> 
> OK, please remember to push a checkpatch revert or equivalent
> when it's done.  Thanks.

Agreed, and at the same time as I remove the prototypes and functions.
I expect that to be during the 6.17 merge window.

							Thanx, Paul