linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mike McCormack <mikem@ring3k.org>
Cc: Larry.Finger@lwfinger.net, chaoming_li@realsil.com.cn,
	linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 4/4] rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with true
Date: Fri, 17 Jun 2011 08:42:09 -0700	[thread overview]
Message-ID: <1308325329.16582.37.camel@Joe-Laptop> (raw)
In-Reply-To: <4DF93EE1.1090102@ring3k.org>

On Thu, 2011-06-16 at 08:23 +0900, Mike McCormack wrote:
> These are a potential source of confusion, as most C code treats all
> non-zero values as true.

Thanks Mike.

Larry has applied this.
Could you please submit a follow up patch that
removes the extra parentheses that surround
the individual boolean variable tests?

> diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
> @@ -523,7 +523,7 @@ static void _rtl_query_shortgi(struct ieee80211_hw *hw,
[]
> -	if ((bw_40 == true) && sgi_40)
> +	if (bw_40 && sgi_40)

Done here.

> diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
[]
> @@ -90,7 +90,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
>  		ppsc->rfoff_reason &= (~changesource);
>  
>  		if ((changesource == RF_CHANGE_BY_HW) &&
> -		    (ppsc->hwradiooff == true)) {
> +		    (ppsc->hwradiooff)) {

Not done here.

		      ppsc->hwradiooff))
or
		if (ppsc->hwradiooff && changesource == RF_CHANGE_BY_HW)

> diff --git a/drivers/net/wireless/rtlwifi/rc.c b/drivers/net/wireless/rtlwifi/rc.c
[]
> @@ -200,7 +200,7 @@ static void rtl_tx_status(void *ppriv,
>  	if (sta) {
>  		/* Check if aggregation has to be enabled for this tid */
>  		sta_entry = (struct rtl_sta_info *) sta->drv_priv;
> -		if ((sta->ht_cap.ht_supported == true) &&
> +		if ((sta->ht_cap.ht_supported) &&

		if (sta->ht_cap.ht_supported &&

etc...

cheers, Joe


      parent reply	other threads:[~2011-06-17 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 23:23 [PATCH 4/4] rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with true Mike McCormack
2011-06-17 15:27 ` Larry Finger
2011-06-17 15:42 ` Joe Perches [this message]

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=1308325329.16582.37.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mikem@ring3k.org \
    /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;
as well as URLs for NNTP newsgroup(s).