On Thu, 4 Jan 2001, Linus Torvalds wrote:

>Changes since the prerelease:
>...
>Matti Aarnio:
> - teach tulip driver about media types 5 and 6

This part of the patch introduces a bug in 2.4.0, as noticed by gcc:

media.c: In function `tulip_select_media':
media.c:268: warning: unused variable `csr15val'
media.c:268: warning: unused variable `csr15dir'
media.c:268: warning: unused variable `csr14val'
media.c:268: warning: unused variable `csr13val'
media.c:151: warning: `new_csr6' might be used uninitialized in this function

The last warning indicates a real problem. The patch adds a new
control flow path in which new_csr6 is _not_ assigned a value,
which causes the procedure's second last statement

        tp->csr6 = new_csr6 | (tp->csr6 & 0xfdff) | (tp->full_duplex ? 0x0200 : 0);

to 'or' random bits into tp->csr6.

The patch also adds four unused variables, which looks rather fishy.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to