linux/drivers/media
Mark Rutland 24fbd6e04e locking/atomics, media/dvb_ringbuffer: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE()
For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
preference to ACCESS_ONCE(), and new code is expected to use one of the
former. So far, there's been no reason to change most existing uses of
ACCESS_ONCE(), as these aren't currently harmful.

However, for some features it is necessary to instrument reads and
writes separately, which is not possible with ACCESS_ONCE(). This
distinction is critical to correct operation.

It's possible to transform the bulk of kernel code using the Coccinelle
script below. However, this doesn't handle comments, leaving references
to ACCESS_ONCE() instances which have been removed. As a preparatory
step, this patch converts the DVB ringbuffer code and comments to use
{READ,WRITE}_ONCE() consistently.

----
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)
----

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: davem@davemloft.net
Cc: linux-arch@vger.kernel.org
Cc: mpe@ellerman.id.au
Cc: shuah@kernel.org
Cc: snitzer@redhat.com
Cc: thor.thayer@linux.intel.com
Cc: tj@kernel.org
Cc: viro@zeniv.linux.org.uk
Cc: will.deacon@arm.com
Link: http://lkml.kernel.org/r/1508792849-3115-6-git-send-email-paulmck@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-25 11:00:58 +02:00
..
cec media fixes for v4.14-rc6 2017-10-17 06:23:09 -04:00
common media: saa7146: constify videobuf_queue_ops structures 2017-08-26 14:29:51 -04:00
dvb-core locking/atomics, media/dvb_ringbuffer: Convert ACCESS_ONCE() to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:00:58 +02:00
dvb-frontends media: dvb: i2c transfers over usb cannot be done from stack 2017-09-23 07:21:33 -04:00
firewire
i2c media: max2175: Propagate the real error on devm_clk_get() failure 2017-08-27 18:14:11 -04:00
mmc
pci Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:13:32 -07:00
platform media fixes for v4.14-rc6 2017-10-17 06:23:09 -04:00
radio media: radio: make video_device const 2017-08-27 08:47:20 -04:00
rc Update James Hogan's email address 2017-10-04 17:11:53 -07:00
spi
tuners media: dvb: i2c transfers over usb cannot be done from stack 2017-09-23 07:21:33 -04:00
usb media: dw2102: make dvb_usb_device_description structures const 2017-08-27 18:08:55 -04:00
v4l2-core media: Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay" 2017-09-05 07:30:34 -04:00
Kconfig media: rc-core: do not depend on MEDIA_SUPPORT 2017-08-20 09:39:36 -04:00
Makefile
media-device.c
media-devnode.c
media-entity.c