RE: [PATCH] Fix missing parameter for local_add

From: Christoph Lameter <clameter_at_engr.sgi.com>
Date: 2005-12-08 06:24:42
On Wed, 7 Dec 2005, Luck, Tony wrote:

> 
> -#define local_add(l)	atomic64_add(&(l)->val)
> +#define local_add(i, l)	atomic64_add((i), &(l)->val)
>  #define local_sub(l)	atomic64_sub(&(l)->val)
>  
>  
> local_sub() looks like it could use the same treatment?

yes. So:

Index: linux-2.6.15-rc5/include/asm-ia64/local.h
===================================================================
--- linux-2.6.15-rc5.orig/include/asm-ia64/local.h	2005-12-03 21:10:42.000000000 -0800
+++ linux-2.6.15-rc5/include/asm-ia64/local.h	2005-12-07 11:23:51.000000000 -0800
@@ -17,8 +17,8 @@ typedef struct {
 #define local_set(l, i)	atomic64_set(&(l)->val, i)
 #define local_inc(l)	atomic64_inc(&(l)->val)
 #define local_dec(l)	atomic64_dec(&(l)->val)
-#define local_add(l)	atomic64_add(&(l)->val)
-#define local_sub(l)	atomic64_sub(&(l)->val)
+#define local_add(i, l)	atomic64_add((i), &(l)->val)
+#define local_sub(i, l)	atomic64_sub((i), &(l)->val)
 
 /* Non-atomic variants, i.e., preemption disabled and won't be touched in interrupt, etc.  */
 
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Thu Dec 08 06:25:17 2005

This archive was generated by hypermail 2.1.8 : 2005-12-08 06:25:24 EST