lkml.org 
[lkml]   [2023]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] checkpatch: Error out if deprecated RCU API used
    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

    \
     
     \ /
      Last update: 2023-03-27 00:46    [W:4.217 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site