Skip to content

Commit

Permalink
net/tg3: simplify conditional
Browse files Browse the repository at this point in the history
Simplify: ((a && !b) || (!a && b)) => (a != b)

Signed-off-by: Nicolas Kaiser <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
nikai3d authored and davem330 committed Oct 9, 2010
1 parent aa3bc6c commit 2259dca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -9968,8 +9968,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;
Expand Down

0 comments on commit 2259dca

Please sign in to comment.