All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: stefano.brivio@polimi.it, linux-wireless@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] B43: misplaced parentheses?
Date: Sun, 15 Feb 2009 17:46:44 +0100	[thread overview]
Message-ID: <200902151746.44754.mb@bu3sch.de> (raw)
In-Reply-To: <499844E7.1040307@gmail.com>

On Sunday 15 February 2009 17:37:59 Roel Kluin wrote:
> I think below is what was intended? otherwise we could as well have written:
> 
>  	b43_radio_write16(dev, txctl_reg,
>  			  (b43_radio_read16(dev, txctl_reg) & ~txctl_value)
> 			  || (rfatt->with_padmix) ? txctl_value : 0);
> 
> 			  ^^--- Note: boolean or

Uhm, no?
Can you please explain why you think this is equal? Does | have precedence over ?:

> 
> please review.
> -------------------------->8------------------8<---------------------------
> Fix misplaced parentheses
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c
> index 6a18a14..88ed75f 100644
> --- a/drivers/net/wireless/b43/lo.c
> +++ b/drivers/net/wireless/b43/lo.c
> @@ -783,7 +783,7 @@ struct b43_lo_calib * b43_calibrate_lo_setting(struct b43_wldev *dev,
>  			  | rfatt->att);
>  	b43_radio_write16(dev, txctl_reg,
>  			  (b43_radio_read16(dev, txctl_reg) & ~txctl_value)
> -			  | (rfatt->with_padmix) ? txctl_value : 0);
> +			  | (rfatt->with_padmix ? txctl_value : 0));
>  
>  	max_rx_gain = rfatt->att * 2;
>  	max_rx_gain += bbatt->att / 2;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 



-- 
Greetings, Michael.

  reply	other threads:[~2009-02-15 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-15 16:37 [PATCH] B43: misplaced parentheses? Roel Kluin
2009-02-15 16:46 ` Michael Buesch [this message]
2009-02-15 16:59   ` Michael Buesch
2009-02-15 17:05 ` Larry Finger
2009-02-15 17:07   ` Michael Buesch
2009-02-15 17:09     ` Larry Finger

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=200902151746.44754.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    --cc=stefano.brivio@polimi.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.