diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2011-11-04 09:21:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-04 23:37:23 +0100 |
commit | 589665f5a6008dbce1d0af2cb93e94a80bf78151 (patch) | |
tree | 4f4ec1949dd233a8474c2cb477da3637166b6e75 /drivers/net/bonding/bond_procfs.c | |
parent | sky2: fix regression on Yukon Optima (diff) | |
download | linux-589665f5a6008dbce1d0af2cb93e94a80bf78151.tar.xz linux-589665f5a6008dbce1d0af2cb93e94a80bf78151.zip |
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 'drivers/net/bonding/bond_procfs.c')
-rw-r--r-- | drivers/net/bonding/bond_procfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c index d2ff52e63cbb..17206da2fab7 100644 --- a/drivers/net/bonding/bond_procfs.c +++ b/drivers/net/bonding/bond_procfs.c @@ -157,12 +157,12 @@ static void bond_info_show_slave(struct seq_file *seq, seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); seq_printf(seq, "MII Status: %s\n", (slave->link == BOND_LINK_UP) ? "up" : "down"); - if (slave->speed == -1) + if (slave->speed == SPEED_UNKNOWN) seq_printf(seq, "Speed: %s\n", "Unknown"); else seq_printf(seq, "Speed: %d Mbps\n", slave->speed); - if (slave->duplex == -1) + if (slave->duplex == DUPLEX_UNKNOWN) seq_printf(seq, "Duplex: %s\n", "Unknown"); else seq_printf(seq, "Duplex: %s\n", slave->duplex ? "full" : "half"); |