[PATCH] net/tg3: simplify conditional

From: Nicolas Kaiser
Date: Fri Oct 08 2010 - 05:32:15 EST


Simplify: ((a && !b) || (!a && b)) => (a != b)

Signed-off-by: Nicolas Kaiser <nikai@xxxxxxxxx>
---
drivers/net/tg3.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 16e1a95..714f0fb 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -9967,8 +9967,7 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam

if (!(phydev->supported & SUPPORTED_Pause) ||
(!(phydev->supported & SUPPORTED_Asym_Pause) &&
- ((epause->rx_pause && !epause->tx_pause) ||
- (!epause->rx_pause && epause->tx_pause))))
+ (epause->rx_pause != epause->tx_pause)))
return -EINVAL;

tp->link_config.flowctrl = 0;
--
1.7.2.2
--
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/