Search Linux Wireless

Re: [PATCH 4/4] rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with true

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux