mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* snd_intel8x0m: error message because return value is unused?
@ 2011-02-21 23:57 Paul Bolle
  0 siblings, 0 replies; only message in thread
From: Paul Bolle @ 2011-02-21 23:57 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-21 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-21 23:57 snd_intel8x0m: error message because return value is unused? Paul Bolle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®