lkml.org 
[lkml]   [2011]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectsnd_intel8x0m: error message because return value is unused?
From
Date
0) In order to make a laptop run without error messages (ie, printks at
KERN_ERR level) I had to look at an error generated by snd_intel8x0m:

ALSA intel8x0m.c:904: AC'97 warm reset still in progress? [0x2]

1) There's a datasheet one can study to understand that message. But
that seems not necessary here. It all boils down to the fact that this
test:

if ((igetdword(chip, ICHREG(GLOB_CNT)) & ICH_AC97WARM) == 0)
goto __ok;

will always fail so we'll never go to __ok and finally that error will
be printed. But if I simply change it into:

cnt = igetdword(chip, ICHREG(GLOB_CNT));
if ((cnt & ICH_AC97WARM) == 0)
goto __ok;

this test will (always) succeed, we'll go to __ok and no error message
will be printed. So apparently, the error message was just a false
alarm.

2) Before I submit a (trivial) patch to fix this I'd like to better
understand what is going on here: is this standard C behavior, something
the build system asks the compiler to do, or maybe something else?


Paul Bolle



\
 
 \ /
  Last update: 2011-02-22 00:59    [W:0.030 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site