Dead code in Starfire driver (set_vlan_mode())
From: Jesper Juhl
Date: Thu Jul 28 2011 - 16:35:50 EST
In drivers/net/starfire.c::set_vlan_mode() there is this code:
...
if (vlan_count == 32) {
ret |= PerfectFilterVlan;
while (vlan_count < 32) {
...
We've just tested 'vlan_count' as being equal to '32', so it's a bit silly
to follow that up with a loop that's conditioned on the variable being
less than that - it will never execute.
Now I don't know this code at all, so I have no idea what the proper fix
is (just remove the loop? change the loop condition? something else?), but
I do know that the current code makes little sense ;-)
Just for your information.
--
Jesper Juhl <jj@xxxxxxxxxxxxx> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/