Skip to contentSkip to conversation

ALSA: use __devexit_p

PATCH In review Randy Dunlap 3 participants 4 messages Jun 23, 2007 – Jun 25, 2007 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: use __devexit_p

From: Randy Dunlap <[email protected]>

Change __devexit to __devexit_p:
sound/isa/opl3sa2.c:956: error: expected expression before '__attribute__'

---
 sound/isa/opl3sa2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/isa/opl3sa2.c +1 -1
@@ -953,7 +953,7 @@ static int snd_opl3sa2_isa_resume(struct
 static struct isa_driver snd_opl3sa2_isa_driver = {
 	.match		= snd_opl3sa2_isa_match,
 	.probe		= snd_opl3sa2_isa_probe,
-	.remove		= __devexit( snd_opl3sa2_isa_remove),
+	.remove		= __devexit_p(snd_opl3sa2_isa_remove),
 #ifdef CONFIG_PM
 	.suspend	= snd_opl3sa2_isa_suspend,
 	.resume		= snd_opl3sa2_isa_resume,
#1 lore raw

This reminds me...

Someone needs to go through ALSA and audit all delays executed via $FOO_interruptible().

Several delays within ALSA wait for hardware conditions, and do not check for signals pending, which means that the wait-for-condition loop becomes a busy loop:

	while (1) {
		foo = read_hardware()
		if (foo & interesting_bits)
			break;
		schedule_timeout_interruptible(1);
	}

The proper fix is (a) remove "_interruptible" [recommended] or (b) check for signals.

grep'ing for "_interruptible" quickly finds several such ALSA bugs.

Jeff

#2 lore raw

At Sat, 23 Jun 2007 18:50:57 -0400,

Quoted 17 lines · Jeff Garzik

This reminds me...

Someone needs to go through ALSA and audit all delays executed via $FOO_interruptible().

Several delays within ALSA wait for hardware conditions, and do not check for signals pending, which means that the wait-for-condition loop becomes a busy loop:

	while (1) {
		foo = read_hardware()
		if (foo & interesting_bits)
			break;
		schedule_timeout_interruptible(1);
	}
Quoted 4 lines

The proper fix is (a) remove "_interruptible" [recommended] or (b) check for signals.

grep'ing for "_interruptible" quickly finds several such ALSA bugs.

Yep... I fixed now on ALSA tree. Thanks for hints!

Takashi