Re: [KJ] remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Robert P. J. Day
On Tue, 10 Apr 2007, Matthew Wilcox wrote: > On Tue, Apr 10, 2007 at 05:45:07PM -0400, Robert P. J. Day wrote: > > that works fine if you're defining a single spinlock, but what do you > > do in cases like this: > > > > arch/sparc/lib/atomic32.c: [0 ... (ATOMIC_HASH_SIZE-1)] = > > SPIN_LOCK_

Re: [KJ] remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Milind Arun Choudhary
On 4/11/07, Matthew Wilcox <[EMAIL PROTECTED]> wrote: On Tue, Apr 10, 2007 at 05:45:07PM -0400, Robert P. J. Day wrote: > that works fine if you're defining a single spinlock, but what do you > do in cases like this: > > arch/sparc/lib/atomic32.c: [0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UN

Re: [KJ] remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Matthew Wilcox
On Tue, Apr 10, 2007 at 05:45:07PM -0400, Robert P. J. Day wrote: > that works fine if you're defining a single spinlock, but what do you > do in cases like this: > > arch/sparc/lib/atomic32.c: [0 ... (ATOMIC_HASH_SIZE-1)] = > SPIN_LOCK_UNLOCKED > > that is, when you're assigning an array o

Re: [KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Roland Dreier
> > Don't worry about the __RAW_SPIN_LOCK_UNLOCKED stuff, that's > > obviously not for generic code to use. The right answer (as I said > > before) is to use DEFINE_SPINLOCK(). > > that works fine if you're defining a single spinlock, but what do you > do in cases like this: > > arch/spa

Re: [KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Robert P. J. Day
On Tue, 10 Apr 2007, Roland Dreier wrote: > > >but that's where you would use the more explicit > > >__RAW_SPIN_LOCK_UNLOCKED, no? AFAIK, you really can remove the macro > > >SPIN_LOCK_UNLOCKED in its entirety. > > > > I don't remember LDD speaking about __RAW_*. (And other than not > > hav

Re: [KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Roland Dreier
> >but that's where you would use the more explicit > >__RAW_SPIN_LOCK_UNLOCKED, no? AFAIK, you really can remove the macro > >SPIN_LOCK_UNLOCKED in its entirety. > > I don't remember LDD speaking about __RAW_*. (And other than not > having looked into the code to date, I don't know the dif

Re: [KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Jan Engelhardt
On Apr 10 2007 17:25, Robert P. J. Day wrote: >On Tue, 10 Apr 2007, Jan Engelhardt wrote: >> On Apr 10 2007 23:46, Milind Arun Choudhary wrote: >> >> >"use spin_lock_init instead of SPIN_LOCK_UNLOCKED" >> >> Fact is, we cannot remove SPIN_LOCK_UNLOCKED. It's needed for >> variables outside functio

Re: [KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Robert P. J. Day
On Tue, 10 Apr 2007, Jan Engelhardt wrote: > > On Apr 10 2007 23:46, Milind Arun Choudhary wrote: > > >"use spin_lock_init instead of SPIN_LOCK_UNLOCKED" > > Fact is, we cannot remove SPIN_LOCK_UNLOCKED. It's needed for > variables outside functions: > > static spinlock_t foobar = SPIN_LOCK_UNLOCK

Re: [KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Roland Dreier
> Fact is, we cannot remove SPIN_LOCK_UNLOCKED. It's needed for > variables outside functions: > > static spinlock_t foobar = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK() is provided to define variables that way. - R. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Jan Engelhardt
On Apr 10 2007 23:46, Milind Arun Choudhary wrote: >"use spin_lock_init instead of SPIN_LOCK_UNLOCKED" Fact is, we cannot remove SPIN_LOCK_UNLOCKED. It's needed for variables outside functions: static spinlock_t foobar = SPIN_LOCK_UNLOCKED; >let me know if this is fine .. not for me to com

[KJ]remove SPIN_LOCK_UNLOCKED

2007-04-10 Thread Milind Arun Choudhary
"use spin_lock_init instead of SPIN_LOCK_UNLOCKED" i'm a bit confused with SPIN_LOCK_UNLOCKED removal I just did the below mentioned change but then came to know that spin_lock_init is defined as # define spin_lock_init(lock) \ do { *(lock) = SPIN_LOCK