From: Anton Blanchard From: Nathan Lynch Hit this in latest bk: include/asm/spinlock.h: In function `_raw_read_lock': include/asm/spinlock.h:198: warning: passing arg 1 of `__rw_yield' from incompa\ tible pointer type include/asm/spinlock.h: In function `_raw_write_lock': include/asm/spinlock.h:255: warning: passing arg 1 of `__rw_yield' from incompa\ tible pointer type This seems to have been broken by the out-of-line spinlocks patch. You won't hit it unless you've enabled CONFIG_PPC_SPLPAR. Use the rwlock_t for the argument type, and move the definition of rwlock_t up next to that of spinlock_t. Signed-off-by: Nathan Lynch Signed-off-by: Anton Blanchard Signed-off-by: Andrew Morton --- 25-akpm/include/asm-ppc64/spinlock.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff -puN include/asm-ppc64/spinlock.h~ppc64-fix-__rw_yield-prototype include/asm-ppc64/spinlock.h --- 25/include/asm-ppc64/spinlock.h~ppc64-fix-__rw_yield-prototype 2004-09-05 22:30:45.195622824 -0700 +++ 25-akpm/include/asm-ppc64/spinlock.h 2004-09-05 22:30:45.198622368 -0700 @@ -25,6 +25,10 @@ typedef struct { volatile unsigned int lock; } spinlock_t; +typedef struct { + volatile signed int lock; +} rwlock_t; + #ifdef __KERNEL__ #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 } @@ -55,7 +59,7 @@ static __inline__ void _raw_spin_unlock( /* We only yield to the hypervisor if we are in shared processor mode */ #define SHARED_PROCESSOR (get_paca()->lppaca.xSharedProc) extern void __spin_yield(spinlock_t *lock); -extern void __rw_yield(spinlock_t *lock); +extern void __rw_yield(rwlock_t *lock); #else /* SPLPAR || ISERIES */ #define __spin_yield(x) barrier() #define __rw_yield(x) barrier() @@ -134,10 +138,6 @@ static void __inline__ _raw_spin_lock_fl * irq-safe write-lock, but readers can get non-irqsafe * read-locks. */ -typedef struct { - volatile signed int lock; -} rwlock_t; - #define RW_LOCK_UNLOCKED (rwlock_t) { 0 } #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) _