Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1380697
| From | Julia Lawall <julia.lawall@lip6.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] checkpatch: Whine about ACCESS_ONCE |
| Date | 2016-04-17 07:50 +0200 |
| Message-ID | <roNKN-7JO-5@gated-at.bofh.it> (permalink) |
| References | <roCmn-7gH-33@gated-at.bofh.it> <roDLs-8sy-5@gated-at.bofh.it> <roEoa-k4-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 job: > > $ cat access_once.cocci > @@ > expression e1; > expression e2; > @@ > > - ACCESS_ONCE(e1) = e2 > + WRITE_ONCE(e1, e2) > > @@ > expression e1; > @@ > > - ACCESS_ONCE(e1) > + READ_ONCE(e1) Looks good to me. Is this something to put in the kernel? julia
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH -next] kernel: Replace ACCESS_ONCE with READ/WRITE_ONCE Davidlohr Bueso <dave@stgolabs.net> - 2016-04-16 19:40 +0200
[PATCH] checkpatch: Whine about ACCESS_ONCE Joe Perches <joe@perches.com> - 2016-04-16 21:10 +0200
Re: [PATCH] checkpatch: Whine about ACCESS_ONCE Joe Perches <joe@perches.com> - 2016-04-16 21:50 +0200
Re: [PATCH] checkpatch: Whine about ACCESS_ONCE Julia Lawall <julia.lawall@lip6.fr> - 2016-04-17 07:50 +0200
Re: [PATCH] checkpatch: Whine about ACCESS_ONCE Joe Perches <joe@perches.com> - 2016-04-17 10:30 +0200
Re: [PATCH] checkpatch: Whine about ACCESS_ONCE Julia Lawall <julia.lawall@lip6.fr> - 2016-04-17 13:20 +0200
Re: [PATCH] checkpatch: Whine about ACCESS_ONCE Julia Lawall <julia.lawall@lip6.fr> - 2016-04-17 13:40 +0200
Re: [PATCH] checkpatch: Whine about ACCESS_ONCE Joe Perches <joe@perches.com> - 2016-04-17 18:10 +0200
coccinelle: bool if (foo) return true; else return false; Joe Perches <joe@perches.com> - 2016-04-19 21:20 +0200
Re: coccinelle: bool if (foo) return true; else return false; Julia Lawall <julia.lawall@lip6.fr> - 2016-04-19 21:20 +0200
Re: [Cocci] coccinelle: bool if (foo) return true; else return false; Michael Stefaniuc <mstefani@redhat.com> - 2016-04-20 09:20 +0200
Re: [Cocci] coccinelle: bool if (foo) return true; else return false; Joe Perches <joe@perches.com> - 2016-04-20 09:30 +0200
[PATCH V2] checkpatch: Whine about ACCESS_ONCE Joe Perches <joe@perches.com> - 2016-04-17 19:30 +0200
csiph-web