* [PATCH] alsa: time reaches -1, tested 0
@ 2009-01-31 11:17 Roel Kluin
2009-01-31 17:09 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-01-31 11:17 UTC (permalink / raw
To: perex, tiwai; +Cc: lkml
With a postfix decrement time will reach -1 rather than 0,
so the warning will not be issued.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 19d3391..e900cdc 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -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");
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] alsa: time reaches -1, tested 0
2009-01-31 11:17 [PATCH] alsa: time reaches -1, tested 0 Roel Kluin
@ 2009-01-31 17:09 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2009-01-31 17:09 UTC (permalink / raw
To: Roel Kluin; +Cc: perex, lkml
At Sat, 31 Jan 2009 12:17:28 +0100,
Roel Kluin wrote:
>
> With a postfix decrement time will reach -1 rather than 0,
> so the warning will not be issued.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Applied now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-31 17:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-31 11:17 [PATCH] alsa: time reaches -1, tested 0 Roel Kluin
2009-01-31 17:09 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.