lkml.org 
[lkml]   [2017]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH tip/core/rcu 20/21] checkpatch: Add warnings for {smp_,}read_barrier_depends()
From
Date
On Fri, 2017-12-01 at 11:51 -0800, Paul E. McKenney wrote:
> Now that both smp_read_barrier_depends() and read_barrier_depends()
> are being de-emphasized, warn if any are added.

This would also warn on existing files when run
with ./scripts/checkpatch.pl -f <file>

Do you want it to check new patches only?

If so the test could become "if (!$file && etc...)

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 95cda3ecc66b..25f7098e2ad3 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -5586,6 +5586,12 @@ sub process {
> }
> }
>
> +# check for smp_read_barrier_depends and read_barrier_depends
> + if ($line =~ /\b(smp_|)read_barrier_depends\(/) {

Must become

+ if ($line =~ /\b(smp_|)read_barrier_depends\s*\(/) {

similar to the lines above this as there are sometimes
spaces between function name and argument parentheses.

\
 
 \ /
  Last update: 2017-12-01 21:15    [W:0.190 / U:2.528 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site