ath9k-devel.lists.ath9k.org archive mirror
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH 0/2] ath9k: kill of ACCESS_ONCE() in MAC drivers
@ 2016-12-27 18:49 Mark Rutland
  2016-12-27 18:49 ` [ath9k-devel] [PATCH 1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE() Mark Rutland
  2016-12-27 18:49 ` [ath9k-devel] [PATCH 2/2] ath9k: ar9003_mac: " Mark Rutland
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Rutland @ 2016-12-27 18:49 UTC (permalink / raw)
  To: ath9k-devel

For several reasons, it would be beneficial to kill off ACCESS_ONCE()
tree-wide, in favour of {READ,WRITE}_ONCE(). These work with aggregate
types, more obviously document their intended behaviour, and are
necessary for tools like KTSAN to work correctly (as otherwise reads and
writes cannot be instrumented separately).

While it's possible to script a tree-wide conversion using Coccinelle,
some cases such as the ath9k MAC drivers require some manual
intervention to ensure that the resulting code remains legible. This
series moves the ath9k MAC drivers over to {READ,WRITE}_ONCE(). In both
cases this is functionally equivalent to the below Coccinelle script
being applied, though the existing formatting is retained.

----
virtual patch

@ depends on patch @
expression E1, E2;
@@

- ACCESS_ONCE(E1) = E2
+ WRITE_ONCE(E1, E2)

@ depends on patch @
expression E;
@@

- ACCESS_ONCE(E)
+ READ_ONCE(E)
----

Thanks,
Mark.

Mark Rutland (2):
  ath9k: ar9002_mac: kill off ACCESS_ONCE()
  ath9k: ar9003_mac: kill off ACCESS_ONCE()

 drivers/net/wireless/ath/ath9k/ar9002_mac.c | 64 ++++++++++----------
 drivers/net/wireless/ath/ath9k/ar9003_mac.c | 92 ++++++++++++++---------------
 2 files changed, 78 insertions(+), 78 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-12 11:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 18:49 [ath9k-devel] [PATCH 0/2] ath9k: kill of ACCESS_ONCE() in MAC drivers Mark Rutland
2016-12-27 18:49 ` [ath9k-devel] [PATCH 1/2] ath9k: ar9002_mac: kill off ACCESS_ONCE() Mark Rutland
2017-01-12 11:00   ` [ath9k-devel] [1/2] " Kalle Valo
2016-12-27 18:49 ` [ath9k-devel] [PATCH 2/2] ath9k: ar9003_mac: " Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).