swim: Add missing spinlock init
PATCH 1/1 swim: Add missing spinlock init
It doesn't seem this spinlock was properly initialized.
---
I can't even build-test this.
drivers/block/swim.c | 1 + 1 file changed, 1 insertion(+)
drivers/block/swim.c +1 -0
@@ -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 ;
Signature · 1 line
Jean Delvare
Quoted 1 line · Jean Delvare
It doesn't seem this spinlock was properly initialized.
Quiet possible. There's no SMP on m68k, so all spinlock ops expand to nothing.
Quoted 12 lines
Signed-off-by Jean Delvare <[email protected]>Cc Finn Thain <[email protected]>Cc Geert Uytterhoeven <[email protected]>---
I can't even build-test this.drivers/block/swim.c | 1 + 1 file changed, 1 insertion(+)
drivers/block/swim.c 2012-09-06 13:09:26.713382169 +0200 static int __devinit swim_floppy_init(st · line 851
Quoted 7 lines
drivers/block/swim.c 2012-09-06 13:09:26.713382169 +0200 renamed from drivers/block/swim.c 2012-07-21 22:58:29.000000000 +0200 +1
-0@@ -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 -- [email protected]
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
Hi Geert,
Quoted 4 lines · Geert Uytterhoeven
Quoted 1 line · Jean Delvare
It doesn't seem this spinlock was properly initialized.
Quiet possible. There's no SMP on m68k, so all spinlock ops expand to nothing.
Can we apply my patch still? Or were you suggesting you're fine with the code as it is?
Certainly this isn't my area of expertise but I don't quite get the point of passing a custom lock to blk_init_queue() if locks resolve to nothing anyway.
Quoted 19 lines
Quoted 19 lines
Signed-off-by Jean Delvare <[email protected]>Cc Finn Thain <[email protected]>Cc Geert Uytterhoeven <[email protected]>---
I can't even build-test this.drivers/block/swim.c | 1 + 1 file changed, 1 insertion(+)drivers/block/swim.c 2012-09-06 13:09:26.713382169 +0200 renamed from drivers/block/swim.c 2012-07-21 22:58:29.000000000 +0200 +1
-0@@ -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;
Signature · 1 line
Jean Delvare
Geert Uytterhoeven
AppliedHi Jean,
Quoted 4 lines · Jean Delvare
Quoted 3 lines · Geert Uytterhoeven
Quoted 1 line · Jean Delvare
It doesn't seem this spinlock was properly initialized.
Quoted 8 lines
Quoted 1 line
Quiet possible. There's no SMP on m68k, so all spinlock ops expand to nothing.
Can we apply my patch still? Or were you suggesting you're fine with the code as it is?
Certainly this isn't my area of expertise but I don't quite get the point of passing a custom lock to
blk_init_queue()if locks resolve to nothing anyway.
Thanks, applied and queued for 3.9.
Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Signed-off-by Jean Delvare <[email protected]>Cc Finn Thain <[email protected]>Cc Geert Uytterhoeven <[email protected]>---
I can't even build-test this.drivers/block/swim.c | 1 + 1 file changed, 1 insertion(+)drivers/block/swim.c 2012-09-06 13:09:26.713382169 +0200 renamed from drivers/block/swim.c 2012-07-21 22:58:29.000000000 +0200 +0
-0@@ -845,6 +845,7 @@ static int __devinit swim_floppy_init(st swd->unit[drive].swd = swd; }
Quoted 4 lines
Quoted 4 lines
drivers/block/swim.c 2012-09-06 13:09:26.713382169 +0200 static int __devinit swim_floppy_init(st · line 851
Quoted 4 lines
drivers/block/swim.c 2012-09-06 13:09:26.713382169 +0200 renamed from drivers/block/swim.c 2012-07-21 22:58:29.000000000 +0200 +1
-0+ 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 -- [email protected]
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