All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Will Deacon <will@kernel.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Marco Elver <elver@google.com>
Subject: Re: [PATCH v2 2/2] locking/atomic/x86: Introduce arch_try_cmpxchg64
Date: Sat, 14 May 2022 00:18:20 +0200	[thread overview]
Message-ID: <20220513221820.GK76023@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220513153009.228282-3-ubizjak@gmail.com>

On Fri, May 13, 2022 at 05:30:09PM +0200, Uros Bizjak wrote:


> +#define arch_try_cmpxchg64(ptr, po, n)					\
> +	((__typeof__(*(ptr)))__try_cmpxchg64((ptr), (unsigned long long *)(po), \
> +					     (unsigned long long)(n)))

That doesn't look right (unless it's so late I really can't read
anymore, in which case ignore me and I'll try again on monday). But the
return value of try_cmpxchg is bool, not typeof(*ptr).

  reply	other threads:[~2022-05-13 22:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 15:30 [PATCH v2 0/2] locking/atomic/x86: Introduce arch_try_cmpxchg64 Uros Bizjak
2022-05-13 15:30 ` [PATCH v2 1/2] locking/atomic: Add generic try_cmpxchg64 support Uros Bizjak
2022-05-13 15:30 ` [PATCH v2 2/2] locking/atomic/x86: Introduce arch_try_cmpxchg64 Uros Bizjak
2022-05-13 22:18   ` Peter Zijlstra [this message]
2022-05-14  9:31     ` Uros Bizjak

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=20220513221820.GK76023@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=boqun.feng@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=elver@google.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=ubizjak@gmail.com \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /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.