Re: [PATCH] checkpatch: Whine about ACCESS_ONCE

2016-04-17 Thread Joe Perches
On Sun, 2016-04-17 at 13:39 +0200, Julia Lawall wrote: > A suitably versatile semantic patch is below.  Feel free to update  > at least the copyright line, and perhaps the initial explanation > and the strings printed in report and org modes. Seems sensible enough, thanks Julia. // Copyright: (C)

Re: [PATCH] checkpatch: Whine about ACCESS_ONCE

2016-04-17 Thread Julia Lawall
A suitably versatile semantic patch is below. Feel free to update at least the copyright line, and perhaps the initial explanation and the strings printed in report and org modes. julia /// Use READ_ONCE or WRITE_ONCE instead of ACCESS_ONCE. /// // Confidence: High // Copyright: (C) 2016 Joe

Re: [PATCH] checkpatch: Whine about ACCESS_ONCE

2016-04-17 Thread Julia Lawall
On Sun, 17 Apr 2016, Joe Perches wrote: > On Sun, 2016-04-17 at 07:43 +0200, Julia Lawall wrote: > > On Sat, 16 Apr 2016, Joe Perches wrote: > > > On Sat, 2016-04-16 at 12:04 -0700, Joe Perches wrote: > > > > Add a test for use of ACCESS_ONCE that could be written using > > > > READ_ONCE or WRIT

Re: [PATCH] checkpatch: Whine about ACCESS_ONCE

2016-04-17 Thread Joe Perches
On Sun, 2016-04-17 at 07:43 +0200, Julia Lawall wrote: > On Sat, 16 Apr 2016, Joe Perches wrote: > > On Sat, 2016-04-16 at 12:04 -0700, Joe Perches wrote: > > > Add a test for use of ACCESS_ONCE that could be written using > > > READ_ONCE or WRITE_ONCE. > > >  > > > --fix it too if desired. > >  >

Re: [PATCH] checkpatch: Whine about ACCESS_ONCE

2016-04-16 Thread Julia Lawall
On Sat, 16 Apr 2016, Joe Perches wrote: > On Sat, 2016-04-16 at 12:04 -0700, Joe Perches wrote: > > Add a test for use of ACCESS_ONCE that could be written using > > READ_ONCE or WRITE_ONCE. > > > > --fix it too if desired. > > And here's a simple coccinelle script that does a > rather better

Re: [PATCH] checkpatch: Whine about ACCESS_ONCE

2016-04-16 Thread Joe Perches
On Sat, 2016-04-16 at 12:04 -0700, Joe Perches wrote: > Add a test for use of ACCESS_ONCE that could be written using > READ_ONCE or WRITE_ONCE. > > --fix it too if desired. And here's a simple coccinelle script that does a rather better job: $ cat access_once.cocci @@ expression e1; expression

[PATCH] checkpatch: Whine about ACCESS_ONCE

2016-04-16 Thread Joe Perches
Add a test for use of ACCESS_ONCE that could be written using READ_ONCE or WRITE_ONCE. --fix it too if desired. Signed-off-by: Joe Perches ---  scripts/checkpatch.pl | 22 ++  1 file changed, 22 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e3