linux/arch
Mark Rutland bfc18e389c atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless()
While __atomic_add_unless() was originally intended as a building-block
for atomic_add_unless(), it's now used in a number of places around the
kernel. It's the only common atomic operation named __atomic*(), rather
than atomic_*(), and for consistency it would be better named
atomic_fetch_add_unless().

This lack of consistency is slightly confusing, and gets in the way of
scripting atomics. Given that, let's clean things up and promote it to
an official part of the atomics API, in the form of
atomic_fetch_add_unless().

This patch converts definitions and invocations over to the new name,
including the instrumented version, using the following script:

  ----
  git grep -w __atomic_add_unless | while read line; do
  sed -i '{s/\<__atomic_add_unless\>/atomic_fetch_add_unless/}' "${line%%:*}";
  done
  git grep -w __arch_atomic_add_unless | while read line; do
  sed -i '{s/\<__arch_atomic_add_unless\>/arch_atomic_fetch_add_unless/}' "${line%%:*}";
  done
  ----

Note that we do not have atomic{64,_long}_fetch_add_unless(), which will
be introduced by later patches.

There should be no functional change as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Palmer Dabbelt <palmer@sifive.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/lkml/20180621121321.4761-2-mark.rutland@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2018-06-21 14:22:32 +02:00
..
alpha atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
arc atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
arm atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
arm64 atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
c6x Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-06-04 20:27:54 -07:00
h8300 atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
hexagon atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
ia64 atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
m68k atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
microblaze docs: Fix some broken references 2018-06-15 18:10:01 -03:00
mips atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
nds32 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-06-04 20:27:54 -07:00
nios2 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-06-04 20:27:54 -07:00
openrisc atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
parisc atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
powerpc atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
riscv atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
s390 atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
sh atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
sparc atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
um Solve a series of broken links for files under Documentation: 2018-06-17 05:25:18 +09:00
unicore32 docs: Fix some broken references 2018-06-15 18:10:01 -03:00
x86 atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
xtensa atomics/treewide: Rename __atomic_add_unless() => atomic_fetch_add_unless() 2018-06-21 14:22:32 +02:00
.gitignore
Kconfig docs: Fix some broken references 2018-06-15 18:10:01 -03:00