diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-11-04 04:21:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-04 18:37:23 -0400 |
commit | 589665f5a6008dbce1d0af2cb93e94a80bf78151 (patch) | |
tree | 4f4ec1949dd233a8474c2cb477da3637166b6e75 /include/linux/ethtool.h | |
parent | 27d240fdae2808d727ad9ce48ec029731a457524 (diff) |
bonding: comparing a u8 with -1 is always false
slave->duplex is a u8 type so the in bond_info_show_slave() when we
check "if (slave->duplex == -1)", it's always false.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r-- | include/linux/ethtool.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 45f00b61c096..de33de1e2052 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -1097,10 +1097,12 @@ struct ethtool_ops { | |||
1097 | #define SPEED_1000 1000 | 1097 | #define SPEED_1000 1000 |
1098 | #define SPEED_2500 2500 | 1098 | #define SPEED_2500 2500 |
1099 | #define SPEED_10000 10000 | 1099 | #define SPEED_10000 10000 |
1100 | #define SPEED_UNKNOWN -1 | ||
1100 | 1101 | ||
1101 | /* Duplex, half or full. */ | 1102 | /* Duplex, half or full. */ |
1102 | #define DUPLEX_HALF 0x00 | 1103 | #define DUPLEX_HALF 0x00 |
1103 | #define DUPLEX_FULL 0x01 | 1104 | #define DUPLEX_FULL 0x01 |
1105 | #define DUPLEX_UNKNOWN 0xff | ||
1104 | 1106 | ||
1105 | /* Which connector port. */ | 1107 | /* Which connector port. */ |
1106 | #define PORT_TP 0x00 | 1108 | #define PORT_TP 0x00 |