The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joel Fernandes <joel@joelfernandes.org>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	RCU <rcu@vger.kernel.org>,
	Oleksiy Avramchenko <oleksiy.avramchenko@sony.com>,
	Jens Axboe <axboe@kernel.dk>,
	Philipp Reisner <philipp.reisner@linbit.com>,
	Bryan Tan <bryantan@vmware.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Eric Dumazet <edumazet@google.com>,
	Bob Pearson <rpearsonhpe@gmail.com>,
	Ariel Levkovich <lariel@nvidia.com>,
	Theodore Ts'o <tytso@mit.edu>, Julian Anastasov <ja@ssi.bg>,
	Uladzislau Rezki <urezki@gmail.com>
Subject: Re: [PATCH] checkpatch: Error out if deprecated RCU API used
Date: Tue, 7 Mar 2023 04:41:04 +0000	[thread overview]
Message-ID: <20230307044104.GA3532764@google.com> (raw)
In-Reply-To: <802731d7bf187573a9084cb23196c096be81b5e1.camel@perches.com>

On Mon, Mar 06, 2023 at 07:23:23PM -0800, Joe Perches wrote:
> On Mon, 2023-03-06 at 22:10 -0500, Joel Fernandes wrote:
> > On Mon, Mar 6, 2023 at 10:08 PM Joe Perches <joe@perches.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.
> 

Did you look for kvfree_rcu? It is either kvfree_rcu() or kfree_rcu().

thanks,

 - Joel


  reply	other threads:[~2023-03-07  4:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-07  3:04 [PATCH] checkpatch: Error out if deprecated RCU API used Joel Fernandes (Google)
2023-03-07  3:08 ` Joe Perches
2023-03-07  3:10   ` Joel Fernandes
2023-03-07  3:23     ` Joe Perches
2023-03-07  4:41       ` Joel Fernandes [this message]
2023-03-07  4:53         ` Joe Perches
2023-03-07  5:11           ` Joel Fernandes
2023-03-07  5:22             ` Joe Perches
2023-03-07  5:32               ` Joel Fernandes

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=20230307044104.GA3532764@google.com \
    --to=joel@joelfernandes.org \
    --cc=apw@canonical.com \
    --cc=axboe@kernel.dk \
    --cc=bryantan@vmware.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=edumazet@google.com \
    --cc=ja@ssi.bg \
    --cc=joe@perches.com \
    --cc=lariel@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=oleksiy.avramchenko@sony.com \
    --cc=paulmck@kernel.org \
    --cc=philipp.reisner@linbit.com \
    --cc=rcu@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=rpearsonhpe@gmail.com \
    --cc=tytso@mit.edu \
    --cc=urezki@gmail.com \
    /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