linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Will Deacon" <will.deacon@arm.com>,
	"Paul McKenney" <paulmck@linux.vnet.ibm.com>,
	boqun.feng@gmail.com, waiman.long@hpe.com,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	"Richard Henderson" <rth@twiddle.net>,
	"Vineet Gupta" <vgupta@synopsys.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Hans-Christian Noren Egtvedt" <egtvedt@samfundet.no>,
	"Miao Steven" <realmz6@gmail.com>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Richard Kuo" <rkuo@codeaurora.org>,
	"Tony Luck" <tony.luck@intel.com>,
	"James Hogan" <james.hogan@imgtec.com>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	"David Howells" <dhowells@redhat.com>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>
Subject: Re: [RFC][PATCH 01/31] locking: Flip arguments to atomic_fetch_or
Date: Fri, 22 Apr 2016 13:09:38 +0200	[thread overview]
Message-ID: <CAMuHMdV79ShATdNZZDWSREpeHEEbSa+UFDynzQRHo63E4L8atw@mail.gmail.com> (raw)
In-Reply-To: <20160422093923.095484070@infradead.org>

On Fri, Apr 22, 2016 at 11:04 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> All the atomic operations have their arguments the wrong way around;

s/wrong/other/?

> make atomic_fetch_or() consistent and flip them.

BTW, there are a few other inconsistencies:

atomic_add_unless()
atomic_cmpxchg()
atomic_inc_not_zero_hint()
atomic_set()
atomic_xchg

git grep "\<atomic_.*atomic_t\>.*\<int\>"

Gr{oetje,eeting}s,

                        Geert

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Will Deacon" <will.deacon@arm.com>,
	"Paul McKenney" <paulmck@linux.vnet.ibm.com>,
	boqun.feng@gmail.com, waiman.long@hpe.com,
	"Frédéric Weisbecker" <fweisbec@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	"Richard Henderson" <rth@twiddle.net>,
	"Vineet Gupta" <vgupta@synopsys.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Hans-Christian Noren Egtvedt" <egtvedt@samfundet.no>,
	"Miao Steven" <realmz6@gmail.com>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Richard Kuo" <rkuo@codeaurora.org>,
	"Tony Luck" <tony.luck@intel.com>,
	"James Hogan" <james.hogan@imgtec.com>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	"David Howells" <dhowells@redhat.com>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	"Michael Ellerman" <mpe@ellerman.id.au>,
	"Martin Schwidefsky" <schwidefsky@de.ibm.com>,
	"Rich Felker" <dalias@libc.org>,
	"David S. Miller" <davem@davemloft.net>,
	cmetcalf@mellanox.com, "Max Filippov" <jcmvbkbc@gmail.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	dbueso@suse.de, "Wu Fengguang" <fengguang.wu@intel.com>
Subject: Re: [RFC][PATCH 01/31] locking: Flip arguments to atomic_fetch_or
Date: Fri, 22 Apr 2016 13:09:38 +0200	[thread overview]
Message-ID: <CAMuHMdV79ShATdNZZDWSREpeHEEbSa+UFDynzQRHo63E4L8atw@mail.gmail.com> (raw)
Message-ID: <20160422110938.mCMdTAo4ccMJqlbWTPOsRyeOauMMX-Xgy6nhWTzsmHg@z> (raw)
In-Reply-To: <20160422093923.095484070@infradead.org>

On Fri, Apr 22, 2016 at 11:04 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> All the atomic operations have their arguments the wrong way around;

s/wrong/other/?

> make atomic_fetch_or() consistent and flip them.

BTW, there are a few other inconsistencies:

atomic_add_unless()
atomic_cmpxchg()
atomic_inc_not_zero_hint()
atomic_set()
atomic_xchg

git grep "\<atomic_.*atomic_t\>.*\<int\>"

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

  parent reply	other threads:[~2016-04-22 11:09 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22  9:04 [RFC][PATCH 00/31] implement atomic_fetch_$op Peter Zijlstra
2016-04-22  9:04 ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 01/31] locking: Flip arguments to atomic_fetch_or Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22 10:54   ` Will Deacon
2016-04-22 11:09   ` Geert Uytterhoeven [this message]
2016-04-22 11:09     ` Geert Uytterhoeven
2016-04-22 14:18     ` Peter Zijlstra
2016-04-22 14:18       ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 02/31] locking,alpha: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22 16:57   ` Richard Henderson
2016-04-23  1:55     ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 03/31] locking,arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}() Peter Zijlstra
2016-04-22 10:50   ` Vineet Gupta
2016-04-22 10:50     ` Vineet Gupta
2016-04-22 14:16     ` Peter Zijlstra
2016-04-22 14:16       ` Peter Zijlstra
2016-04-25  4:26       ` Vineet Gupta
2016-04-25  4:26         ` Vineet Gupta
2016-04-22 14:26     ` Peter Zijlstra
2016-04-22 14:26       ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 04/31] locking,arm: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22 11:35   ` Will Deacon
2016-04-22 11:35     ` Will Deacon
2016-04-22  9:04 ` [RFC][PATCH 05/31] locking,arm64: " Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22 11:08   ` Will Deacon
2016-04-22 14:23   ` Will Deacon
2016-04-22 14:23     ` Will Deacon
2016-04-22  9:04 ` [RFC][PATCH 06/31] locking,avr32: Implement atomic_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22 11:58   ` Hans-Christian Noren Egtvedt
2016-04-22 11:58     ` Hans-Christian Noren Egtvedt
2016-04-22  9:04 ` [RFC][PATCH 07/31] locking,blackfin: " Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 08/31] locking,frv: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 09/31] locking,h8300: Implement atomic_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 10/31] locking,hexagon: " Peter Zijlstra
2016-04-23  2:16   ` Peter Zijlstra
2016-04-26  0:39     ` Richard Kuo
2016-04-22  9:04 ` [RFC][PATCH 11/31] locking,ia64: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 12/31] locking,m32r: Implement atomic_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 13/31] locking,m68k: " Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 14/31] locking,metag: " Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-30  0:20   ` James Hogan
2016-05-02  8:15     ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 15/31] locking,mips: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 16/31] locking,mn10300: Implement atomic_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 17/31] locking,parisc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 18/31] locking,powerpc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}{,_relaxed,_acquire,_release}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22 16:41   ` Boqun Feng
2016-04-23  2:31     ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 19/31] locking,s390: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-25  8:06   ` Martin Schwidefsky
2016-04-25  8:06     ` Martin Schwidefsky
2016-04-25  8:26     ` Peter Zijlstra
2016-04-25  8:26       ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 20/31] locking,sh: Implement atomic_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 21/31] locking,sparc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 22/31] locking,tile: " Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-25 21:10   ` Chris Metcalf
     [not found]   ` <571E840A.8090703@mellanox.com>
2016-04-26 15:28     ` Peter Zijlstra
2016-04-26 15:32       ` Chris Metcalf
2016-04-22  9:04 ` [RFC][PATCH 23/31] locking,x86: " Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 24/31] locking,xtensa: Implement atomic_fetch_{add,sub,and,or,xor}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 25/31] locking: Fix atomic64_relaxed bits Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 26/31] locking: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}() Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 27/31] locking: Remove linux/atomic.h:atomic_fetch_or Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22 13:02   ` Will Deacon
2016-04-22 14:21     ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 28/31] locking: Remove the deprecated atomic_{set,clear}_mask() functions Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 29/31] locking,alpha: Convert to _relaxed atomics Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 30/31] locking,mips: " Peter Zijlstra
2016-04-22  9:04   ` Peter Zijlstra
2016-04-22  9:04 ` [RFC][PATCH 31/31] locking,qrwlock: Employ atomic_fetch_add_acquire() Peter Zijlstra
2016-04-22 14:25   ` Waiman Long
2016-04-22  9:44 ` [RFC][PATCH 00/31] implement atomic_fetch_$op Peter Zijlstra
2016-04-22  9:44   ` Peter Zijlstra
2016-04-22 12:56   ` Fengguang Wu
2016-04-22 13:03     ` Will Deacon
2016-04-22 13:03       ` Will Deacon
2016-04-22 14:23     ` Peter Zijlstra
2016-04-23  1:59       ` Fengguang Wu
2016-04-22 18:35     ` Kalle Valo
2016-04-23  3:23       ` Fengguang Wu

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=CAMuHMdV79ShATdNZZDWSREpeHEEbSa+UFDynzQRHo63E4L8atw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=boqun.feng@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=egtvedt@samfundet.no \
    --cc=fweisbec@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=jejb@parisc-linux.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=ralf@linux-mips.org \
    --cc=realmz6@gmail.com \
    --cc=rkuo@codeaurora.org \
    --cc=rth@twiddle.net \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=vgupta@synopsys.com \
    --cc=waiman.long@hpe.com \
    --cc=will.deacon@arm.com \
    --cc=ysato@users.sourceforge.jp \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).