Re: Warning message during linux kernel 2.4.21 compilation (ymfpci.c)

Pete Zaitcev (zaitcev@redhat.com)
Sun, 22 Jun 2003 02:11:42 -0400


> Date: Sun, 22 Jun 2003 05:10:13 +0900
> From: Ishikawa <ishikawa@yk.rim.or.jp>

> It certainly looks that something is wrong with the code.
> (Maybe some masking of the eid and the immediate value is missing?)

> u16 eid;
> ...

> 2462 eid = ymfpci_codec_read(codec, AC97_EXTENDED_ID);
> -->2463 if (eid==0xFFFFFF) {
> printk(KERN_WARNING "ymfpci: no codec attached ?\n");
> goto out_kfree;
> }

This is indeed a bug, and ymfpci inherits it from cs46xx.c.
I wonder why cs46xx.c does not trigger a warning.

Since the check never worked and nobody ever complained,
I think the best fix is to remove the "if" statement with
its block. If we repair the comparison to "eid == 0xFFFF",
then we run a risk of breaking previously working systems.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/