public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Matt Carlson" <mcarlson@broadcom.com>
To: "Nicolas Kaiser" <nikai@nikai.net>
Cc: "Matthew Carlson" <mcarlson@broadcom.com>,
	"Michael Chan" <mchan@broadcom.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/tg3: simplify conditional
Date: Fri, 8 Oct 2010 10:43:12 -0700	[thread overview]
Message-ID: <20101008174312.GA3562@mcarlson.broadcom.com> (raw)
In-Reply-To: <20101008112927.0ca949cf@absol.kitzblitz>

On Fri, Oct 08, 2010 at 02:29:27AM -0700, Nicolas Kaiser wrote:
> 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;

Looks good to me.


  reply	other threads:[~2010-10-08 17:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08  9:29 [PATCH] net/tg3: simplify conditional Nicolas Kaiser
2010-10-08 17:43 ` Matt Carlson [this message]
2010-10-09 16:23   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101008174312.GA3562@mcarlson.broadcom.com \
    --to=mcarlson@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikai@nikai.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox