Re: [PATCH] asm-generic: fix local_add_unless macro

From: Mathieu Desnoyers
Date: Thu Jan 22 2009 - 13:06:05 EST

* Roel Kluin (roel.kluin@xxxxxxxxx) wrote:
> When this macro isn't called with 'a' this will
> result in a build failure.

Can I have a look at the offending calling code and the build failure
output ? We might consider changing these for static inlines instead.
And clearly, just changing a single primitive is not going to work. We
need to address the other similar in the same file at the very least.


> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> diff --git a/include/asm-generic/local.h b/include/asm-generic/local.h
> index dbd6150..fc21844 100644
> --- a/include/asm-generic/local.h
> +++ b/include/asm-generic/local.h
> @@ -42,7 +42,7 @@ typedef struct
> #define local_cmpxchg(l, o, n) atomic_long_cmpxchg((&(l)->a), (o), (n))
> #define local_xchg(l, n) atomic_long_xchg((&(l)->a), (n))
> -#define local_add_unless(l, a, u) atomic_long_add_unless((&(l)->a), (a), (u))
> +#define local_add_unless(l, _a, u) atomic_long_add_unless((&(l)->a), (_a), (u))
> #define local_inc_not_zero(l) atomic_long_inc_not_zero(&(l)->a)
> /* Non-atomic variants, ie. preemption disabled and won't be touched

Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at