lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 17 Feb 2012 09:48:30 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	mcarlson@...adcom.com
Cc:	netdev@...r.kernel.org
Subject: re: tg3: Use *_UNKNOWN ethtool definitions

Hello Matt Carlson,

The patch e740522e6d3a: "tg3: Use *_UNKNOWN ethtool definitions" from 
Feb 13, 2012, leads to the following Smatch warning:
drivers/net/ethernet/broadcom/tg3.c:1822 tg3_adjust_link()
	 error: tp->link_config.active_speed is never equal to -1 (wrong type 0 - 65535).

-       if ((phydev->link && tp->link_config.active_speed == SPEED_INVALID) ||
-           (!phydev->link && tp->link_config.active_speed != SPEED_INVALID) ||
+       if ((phydev->link && tp->link_config.active_speed == SPEED_UNKNOWN) ||
+           (!phydev->link && tp->link_config.active_speed != SPEED_UNKNOWN) ||

Since tp->link_config.active_speed is an unsigned short, it never is
equal to SPEED_UNKNOWN (-1).

I introduced the SPEED_UNKNOWN so I feel bad that it's causing trouble
now.  :/

Also this warning:
drivers/net/ethernet/broadcom/tg3.c:3909 tg3_phy_copper_begin(14)
error: tp->link_config.speed is never equal to -1 (wrong type 0 - 65535).

regards,
dan carpenter



Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists