public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: akpm@linux-foundation.org, Christoph Lameter <clameter@sgi.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	penberg@cs.helsinki.fi, tglx@linutronix.de,
	vegard.nossum@gmail.com
Subject: Cast cmpxchg64 and cmpxchg64_local result for 386 and 486 - Fix missing parenthesis
Date: Tue, 12 Feb 2008 17:59:29 -0500	[thread overview]
Message-ID: <20080212225929.GA20933@Krystal> (raw)
In-Reply-To: <Pine.LNX.4.64.0802121404470.9183@schroedinger.engr.sgi.com>

Two pairs of parenthesis were missing around the result cast of cmpxchg64 and
cmpxchg64_local. This is a rather stupid mistake in
"Cast cmpxchg and cmpxchg_local result for 386 and 486". My bad. This fix
should be folded with the previous.

Sorry for this trivial bug which should have never appeared in the first place.
The aim was to fix cmpxchg and cmpxchg_local, which were used in slub. cmpxchg64
and cmpxchg64_local happen to be only used in LTTng currently.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
CC: akpm@linux-foundation.org
---
 include/asm-x86/cmpxchg_32.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: linux-2.6-lttng/include/asm-x86/cmpxchg_32.h
===================================================================
--- linux-2.6-lttng.orig/include/asm-x86/cmpxchg_32.h	2008-02-12 17:49:32.000000000 -0500
+++ linux-2.6-lttng/include/asm-x86/cmpxchg_32.h	2008-02-12 17:50:18.000000000 -0500
@@ -305,11 +305,11 @@ extern unsigned long long cmpxchg_486_u6
 ({									\
 	__typeof__(*(ptr)) __ret;					\
 	if (likely(boot_cpu_data.x86 > 4))				\
-		__ret = __typeof__(*(ptr))__cmpxchg64((ptr),		\
+		__ret = (__typeof__(*(ptr)))__cmpxchg64((ptr),		\
 				(unsigned long long)(o),		\
 				(unsigned long long)(n));		\
 	else								\
-		__ret = __typeof__(*(ptr))cmpxchg_486_u64((ptr),	\
+		__ret = (__typeof__(*(ptr)))cmpxchg_486_u64((ptr),	\
 				(unsigned long long)(o),		\
 				(unsigned long long)(n));		\
 	__ret;								\
@@ -318,11 +318,11 @@ extern unsigned long long cmpxchg_486_u6
 ({									\
 	__typeof__(*(ptr)) __ret;					\
 	if (likely(boot_cpu_data.x86 > 4))				\
-		__ret = __typeof__(*(ptr))__cmpxchg64_local((ptr),	\
+		__ret = (__typeof__(*(ptr)))__cmpxchg64_local((ptr),	\
 				(unsigned long long)(o),		\
 				(unsigned long long)(n));		\
 	else								\
-		__ret = __typeof__(*(ptr))cmpxchg_486_u64((ptr),	\
+		__ret = (__typeof__(*(ptr)))cmpxchg_486_u64((ptr),	\
 				(unsigned long long)(o),		\
 				(unsigned long long)(n));		\
 	__ret;								\
-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

           reply	other threads:[~2008-02-12 22:59 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <Pine.LNX.4.64.0802121404470.9183@schroedinger.engr.sgi.com>]

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=20080212225929.GA20933@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=akpm@linux-foundation.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    --cc=tglx@linutronix.de \
    --cc=vegard.nossum@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox