[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <802731d7bf187573a9084cb23196c096be81b5e1.camel@perches.com>
Date: Mon, 06 Mar 2023 19:23:23 -0800
From: Joe Perches <joe@...ches.com>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: linux-kernel@...r.kernel.org, Andy Whitcroft <apw@...onical.com>,
Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
"Paul E. McKenney" <paulmck@...nel.org>, RCU <rcu@...r.kernel.org>,
Oleksiy Avramchenko <oleksiy.avramchenko@...y.com>,
Jens Axboe <axboe@...nel.dk>,
Philipp Reisner <philipp.reisner@...bit.com>,
Bryan Tan <bryantan@...are.com>,
Steven Rostedt <rostedt@...dmis.org>,
Eric Dumazet <edumazet@...gle.com>,
Bob Pearson <rpearsonhpe@...il.com>,
Ariel Levkovich <lariel@...dia.com>,
Theodore Ts'o <tytso@....edu>, Julian Anastasov <ja@....bg>,
Uladzislau Rezki <urezki@...il.com>
Subject: Re: [PATCH] checkpatch: Error out if deprecated RCU API used
On Mon, 2023-03-06 at 22:10 -0500, Joel Fernandes wrote:
> On Mon, Mar 6, 2023 at 10:08 PM Joe Perches <joe@...ches.com> wrote:
> >
> > On Tue, 2023-03-07 at 03:04 +0000, Joel Fernandes (Google) wrote:
> > > Single-argument kvfree_rcu() usage is being deprecated [1] [2] as it is
> > > error-prone. However, till all users are converted, we would like to introduce
> > > checkpatch errors for new patches submitted.
> > >
> > > This patch adds support for the same. Tested with a trial patch.
> > >
> > > For now, we are only considering usages that don't have compound
> > > nesting, for example ignore: kvfree_rcu( (rcu_head_obj), rcu_head_name).
> > > This is sufficient as such usages are unlikely.
> > >
> > > Once all users are converted and we remove the old API, we can also revert this
> > > checkpatch patch then.
> >
> > I think this should be added to the deprecated_apis hash instead
> >
> > our %deprecated_apis = (
> > "synchronize_rcu_bh" => "synchronize_rcu",
> > "synchronize_rcu_bh_expedited" => "synchronize_rcu_expedited",
> > "call_rcu_bh" => "call_rcu",
> > "rcu_barrier_bh" => "rcu_barrier",
> > "synchronize_sched" => "synchronize_rcu",
> > "synchronize_sched_expedited" => "synchronize_rcu_expedited",
> > "call_rcu_sched" => "call_rcu",
> > "rcu_barrier_sched" => "rcu_barrier",
> > "get_state_synchronize_sched" => "get_state_synchronize_rcu",
> > "cond_synchronize_sched" => "cond_synchronize_rcu",
> > "kmap" => "kmap_local_page",
> > "kunmap" => "kunmap_local",
> > "kmap_atomic" => "kmap_local_page",
> > "kunmap_atomic" => "kunmap_local",
> > );
>
> This is not an API name change though, it is a "number of arguments"
> or argument list change. Is there a different way to do it?
Ah, no, not really.
btw: I don't see a single use of this call without a comma in the tree.
Powered by blists - more mailing lists