Re: [PATCH] swim: Add missing spinlock init

From: Geert Uytterhoeven
Date: Thu Sep 06 2012 - 08:03:48 EST


On Thu, Sep 6, 2012 at 1:48 PM, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
> It doesn't seem this spinlock was properly initialized.

Quiet possible. There's no SMP on m68k, so all spinlock ops expand to nothing.

> Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
> Cc: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
> Cc: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> ---
> I can't even build-test this.
>
> drivers/block/swim.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux-3.6-rc4.orig/drivers/block/swim.c 2012-07-21 22:58:29.000000000 +0200
> +++ linux-3.6-rc4/drivers/block/swim.c 2012-09-06 13:09:26.713382169 +0200
> @@ -845,6 +845,7 @@ static int __devinit swim_floppy_init(st
> swd->unit[drive].swd = swd;
> }
>
> + spin_lock_init(&swd->lock);
> swd->queue = blk_init_queue(do_fd_request, &swd->lock);
> if (!swd->queue) {
> err = -ENOMEM;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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/