All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH 01/13] atomics/treewide: s/__atomic_add_unless/atomic_fetch_add_unless/
Date: Wed, 23 May 2018 16:01:17 +0200	[thread overview]
Message-ID: <CAMuHMdXuj3Z-42Hxo2qqj+E4-WVazMHaaFXGknFE=YJ-Zx4+Yg@mail.gmail.com> (raw)
In-Reply-To: <20180523133533.1076-2-mark.rutland@arm.com>

On Wed, May 23, 2018 at 3:35 PM, Mark Rutland <mark.rutland@arm.com> wrote:
> 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 offical part of the atomics API, in the form of
> atomic_fetch_add_unless().
>
> This patch converts definitions and uses 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>

>  arch/m68k/include/asm/atomic.h            | 2 +-

For m68k:
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2018-05-23 14:01 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23 13:35 [PATCH 00/13] atomics: API cleanups Mark Rutland
2018-05-23 13:35 ` [PATCH 01/13] atomics/treewide: s/__atomic_add_unless/atomic_fetch_add_unless/ Mark Rutland
2018-05-23 14:01   ` Geert Uytterhoeven [this message]
2018-05-23 13:35 ` [PATCH 02/13] atomics/treewide: remove redundant atomic_inc_not_zero() definitions Mark Rutland
2018-05-24  8:26   ` Mark Rutland
2018-05-23 13:35 ` [PATCH 03/13] atomics/treewide: make atomic64_inc_not_zero() optional Mark Rutland
2018-05-23 13:35 ` [PATCH 04/13] atomics/treewide: make atomic_fetch_add_unless() optional Mark Rutland
2018-05-23 14:02   ` Geert Uytterhoeven
2018-05-23 13:35 ` [PATCH 05/13] atomics: prepare for atomic64_fetch_add_unless() Mark Rutland
2018-05-23 13:35 ` [PATCH 06/13] atomics/generic: define atomic64_fetch_add_unless() Mark Rutland
2018-05-23 13:35 ` [PATCH 07/13] atomics/alpha: " Mark Rutland
2018-05-23 13:35 ` [PATCH 08/13] atomics/arc: " Mark Rutland
2018-05-23 13:35 ` [PATCH 09/13] atomics/arm: " Mark Rutland
2018-05-23 13:35 ` [PATCH 10/13] atomics/powerpc: " Mark Rutland
2018-05-24  1:50   ` Michael Ellerman
2018-05-23 13:35 ` [PATCH 11/13] atomics/riscv: " Mark Rutland
2018-05-23 13:35 ` [PATCH 12/13] atomics/treewide: make atomic64_fetch_add_unless() optional Mark Rutland
2018-05-23 13:35 ` [PATCH 13/13] atomics/treewide: make test ops optional Mark Rutland
2018-05-23 14:03   ` Geert Uytterhoeven
2018-05-29  9:11   ` Mark Rutland
2018-05-29  9:57     ` Mark Rutland
2018-05-29 10:49     ` Peter Zijlstra
2018-05-23 17:18 ` [PATCH 00/13] atomics: API cleanups Peter Zijlstra
2018-05-24  8:27   ` Mark Rutland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdXuj3Z-42Hxo2qqj+E4-WVazMHaaFXGknFE=YJ-Zx4+Yg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=boqun.feng@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.