mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
6aa7de0591
Please do not apply this to mainline directly, instead please re-run the coccinelle script shown below and apply its output. 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 harmful, and changing them results in churn. However, for some features, the read/write distinction is critical to correct operation. To distinguish these cases, separate read/write accessors must be used. This patch migrates (most) remaining ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following coccinelle script: ---- // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and // WRITE_ONCE() // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch 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: Peter Zijlstra <peterz@infradead.org> 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-19-git-send-email-paulmck@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org> |
||
---|---|---|
.. | ||
88pm80x_onkey.c | ||
88pm860x_onkey.c | ||
ab8500-ponkey.c | ||
ad714x-i2c.c | ||
ad714x-spi.c | ||
ad714x.c | ||
ad714x.h | ||
adxl34x-i2c.c | ||
adxl34x-spi.c | ||
adxl34x.c | ||
adxl34x.h | ||
apanel.c | ||
arizona-haptics.c | ||
ati_remote2.c | ||
atlas_btns.c | ||
atmel_captouch.c | ||
axp20x-pek.c | ||
bfin_rotary.c | ||
bma150.c | ||
cm109.c | ||
cma3000_d0x_i2c.c | ||
cma3000_d0x.c | ||
cma3000_d0x.h | ||
cobalt_btns.c | ||
cpcap-pwrbutton.c | ||
da9052_onkey.c | ||
da9055_onkey.c | ||
da9063_onkey.c | ||
dm355evm_keys.c | ||
drv260x.c | ||
drv2665.c | ||
drv2667.c | ||
e3x0-button.c | ||
gp2ap002a00f.c | ||
gpio_decoder.c | ||
gpio_tilt_polled.c | ||
gpio-beeper.c | ||
hisi_powerkey.c | ||
hp_sdc_rtc.c | ||
ideapad_slidebar.c | ||
ims-pcu.c | ||
ixp4xx-beeper.c | ||
Kconfig | ||
keyspan_remote.c | ||
kxtj9.c | ||
m68kspkr.c | ||
Makefile | ||
max8925_onkey.c | ||
max8997_haptic.c | ||
max77693-haptic.c | ||
mc13783-pwrbutton.c | ||
mma8450.c | ||
palmas-pwrbutton.c | ||
pcap_keys.c | ||
pcf8574_keypad.c | ||
pcf50633-input.c | ||
pcspkr.c | ||
pm8xxx-vibrator.c | ||
pm8941-pwrkey.c | ||
pmic8xxx-pwrkey.c | ||
powermate.c | ||
pwm-beeper.c | ||
pwm-vibra.c | ||
rb532_button.c | ||
regulator-haptic.c | ||
retu-pwrbutton.c | ||
rk805-pwrkey.c | ||
rotary_encoder.c | ||
sgi_btns.c | ||
sirfsoc-onkey.c | ||
soc_button_array.c | ||
sparcspkr.c | ||
tps65218-pwrbutton.c | ||
twl4030-pwrbutton.c | ||
twl4030-vibra.c | ||
twl6040-vibra.c | ||
uinput.c | ||
wistron_btns.c | ||
wm831x-on.c | ||
xen-kbdfront.c | ||
yealink.c | ||
yealink.h |