Re: [RFC][Patch] IBM Real-Time "SMI Free" mode drive -v2

From: Thomas Gleixner
Date: Tue Dec 15 2009 - 19:09:29 EST


On Tue, 15 Dec 2009, Jonathan Corbet wrote:
> On Tue, 15 Dec 2009 12:09:48 -0800
> Keith Mannthey <kmannth@xxxxxxxxxx> wrote:
>
> > +#include <linux/sysdev.h>
> > +#include <asm/byteorder.h>
> > +#include "rtl.h"
> > +
> > +static spinlock_t rtl_lock;
>
> You should probably include <linux/spinlock.h> for this.

And use:

DEFINE_SPINLOCK(rtl_lock);

because the lock is uninitialized otherwise. Running that code with
lockdep would have warned about that.

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/