linux/drivers/crypto
Mark Rutland 6aa7de0591 locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
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>
2017-10-25 11:01:08 +02:00
..
amcc
axis crypto: axis - hide an unused variable 2017-09-22 17:38:19 +08:00
bcm crypto: brcm - Support more FlexRM rings than SPU engines. 2017-08-03 13:52:43 +08:00
caam locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
cavium crypto: cavium/nitrox - Fix an error handling path in 'nitrox_probe()' 2017-08-22 14:54:55 +08:00
ccp dmaengine updates for 4.14-rc1 2017-09-07 14:03:05 -07:00
chelsio Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-07-14 22:49:50 -07:00
inside-secure crypto: inside-secure - fix gcc-4.9 warnings 2017-09-20 17:42:41 +08:00
marvell
mediatek crypto: mediatek - fix error return code in mtk_crypto_probe() 2017-07-18 17:50:54 +08:00
nx locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
qat crypto: qat - fix spelling mistake: "runing" -> "running" 2017-07-18 17:50:51 +08:00
qce
rockchip crypto: rockchip - Don't dequeue the request when device is busy 2017-08-22 14:54:54 +08:00
stm32 crypto: stm32 - Try to fix hash padding 2017-10-07 12:04:31 +08:00
sunxi-ss crypto: sun4i-ss - support the Security System PRNG 2017-07-18 17:50:55 +08:00
ux500
virtio crypto: virtio - Refacotor virtio_crypto driver for new virito crypto services 2017-07-18 17:50:51 +08:00
vmx crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
Kconfig crypto: axis - add ARTPEC-6/7 crypto accelerator driver 2017-08-22 14:54:52 +08:00
Makefile crypto: axis - add ARTPEC-6/7 crypto accelerator driver 2017-08-22 14:54:52 +08:00
atmel-aes-regs.h
atmel-aes.c
atmel-authenc.h
atmel-ecc.c crypto: atmel-ecc - fix signed integer to u8 assignment 2017-08-03 13:47:23 +08:00
atmel-ecc.h crypto: atmel-ecc - introduce Microchip / Atmel ECC driver 2017-07-18 17:50:58 +08:00
atmel-sha-regs.h
atmel-sha.c crypto: atmel-sha - remove unnecessary static in atmel_sha_remove() 2017-08-03 13:47:16 +08:00
atmel-tdes-regs.h
atmel-tdes.c crypto: atmel-tdes - remove unnecessary static in atmel_tdes_remove() 2017-08-03 13:47:18 +08:00
bfin_crc.c
bfin_crc.h
exynos-rng.c
geode-aes.c crypto: geode-aes - fixed coding style warnings and error 2017-07-18 18:15:57 +08:00
geode-aes.h
hifn_795x.c
img-hash.c crypto: img-hash - remove unnecessary static in img_hash_remove() 2017-08-03 13:47:18 +08:00
ixp4xx_crypto.c crypto: ixp4xx - Fix error handling path in 'aead_perform()' 2017-08-09 20:01:33 +08:00
mv_cesa.c
mv_cesa.h
mxc-scc.c crypto: mxc-scc - fix error code in mxc_scc_probe() 2017-07-18 17:50:54 +08:00
mxs-dcp.c crypto: mxs-dcp - print error message on platform_get_irq failure 2017-07-18 17:50:54 +08:00
n2_asm.S
n2_core.c crypto: n2 - Convert to using %pOF instead of full_name 2017-08-03 13:47:15 +08:00
n2_core.h
omap-aes-gcm.c
omap-aes.c crypto: omap-aes - fix error return code in omap_aes_probe() 2017-07-18 17:50:55 +08:00
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c crypto: omap-des - fix error return code in omap_des_probe() 2017-07-18 17:50:55 +08:00
omap-sham.c crypto: omap-sham - remove unnecessary static in omap_sham_remove() 2017-08-03 13:47:15 +08:00
padlock-aes.c
padlock-sha.c
picoxcell_crypto.c
picoxcell_crypto_regs.h
s5p-sss.c
sahara.c crypto: sahara - constify platform_device_id 2017-08-22 14:54:53 +08:00
talitos.c crypto: talitos - Don't provide setkey for non hmac hashing algs. 2017-09-20 17:42:40 +08:00
talitos.h