netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/tg3: simplify conditional
@ 2010-10-08  9:29 Nicolas Kaiser
  2010-10-08 17:43 ` Matt Carlson
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Kaiser @ 2010-10-08  9:29 UTC (permalink / raw)
  To: Matt Carlson; +Cc: Michael Chan, netdev, linux-kernel

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

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-09 16:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08  9:29 [PATCH] net/tg3: simplify conditional Nicolas Kaiser
2010-10-08 17:43 ` Matt Carlson
2010-10-09 16:23   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).