Skip to contentSkip to conversation

alsa: time reaches -1, tested 0

PATCH In review Roel Kluin 2 participants 2 messages Jan 31, 2009 Sound

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 alsa: time reaches -1, tested 0

With a postfix decrement time will reach -1 rather than 0, so the warning will not be issued.

---

sound/pci/intel8x0.c +1 -1
index 19d3391..e900cdc 100644
@@ -617,7 +617,7 @@ static int snd_intel8x0_ali_codec_semaphore(struct intel8x0 *chip)
 	int time = 100;
 	if (chip->buggy_semaphore)
 		return 0; /* just ignore ... */
-	while (time-- && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY))
+	while (--time && (igetdword(chip, ICHREG(ALI_CAS)) & ALI_CAS_SEM_BUSY))
 		udelay(1);
 	if (! time && ! chip->in_ac97_init)
 		snd_printk(KERN_WARNING "ali_codec_semaphore timeout\n");
#1 lore raw

At Sat, 31 Jan 2009 12:17:28 +0100,

Quoted 5 lines · Roel Kluin

With a postfix decrement time will reach -1 rather than 0, so the warning will not be issued.

Applied now. Thanks.

Takashi