12/34: cdrom/cdu31a: replace interruptible_sleep_on() with
Quoted 8 lines · Nishanth Aravamudan
Hi,
Please consider applying.
Description: Use
wait_event_interruptible()instead of the deprecatedinterruptible_sleep_on(). The patch is straight-forward as the macros should result in the same execution. Patch is compile-tested (still throws out warnings regarding {save,restore}_flags()).
It also indirectly calls schedule() with interrupts disabled... this can't be right?
Domen
Review
Quoted 12 lines
(quoted diff) +4
-6cli(); - while (sony_inuse) { - interruptible_sleep_on(&sony_wait); - if (signal_pending(current)) { - restore_flags(flags); - return -EAGAIN; - } + wait_event_interruptible(sony_wait, sony_inuse); + if (signal_pending(current)) { + restore_flags(flags); + return -EAGAIN;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [KJ] Re: 12/34: cdrom/cdu31a: replace interruptible_sleep_on()
Quoted 5 lines · Domen Puncer
Quoted 4 lines · Nishanth Aravamudan
Hi,
Please consider applying.
Quoted 19 lines
Quoted 4 lines
Description: Use
wait_event_interruptible()instead of the deprecatedinterruptible_sleep_on(). The patch is straight-forward as the macros should result in the same execution. Patch is compile-tested (still throws out warnings regarding {save,restore}_flags()).It also indirectly calls
schedule()with interrupts disabled... this can't be right?Quoted 11 lines
cli();(quoted diff) +4
-6- while (sony_inuse) { - interruptible_sleep_on(&sony_wait); - if (signal_pending(current)) { - restore_flags(flags); - return -EAGAIN; - } + wait_event_interruptible(sony_wait, sony_inuse); + if (signal_pending(current)) { + restore_flags(flags); + return -EAGAIN;
Yes, pretty much any driver that still calls cli()/sti() is broken in one way or another. I think you are right, though, that the schedule() with interrupts cleared makes little sense. I'm not sure how to fix it though.
-Nish
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors