Commit 2060f31a authored by Haneen Mohammed's avatar Haneen Mohammed Committed by Greg Kroah-Hartman

Staging: rtl8192u: Remove parentheses around right side an assignment

Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)
Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0886f73
...@@ -130,8 +130,8 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm, ...@@ -130,8 +130,8 @@ static void ccmp_init_blocks(struct crypto_tfm *tfm,
(WLAN_FC_GET_STYPE(fc) & 0x08)); (WLAN_FC_GET_STYPE(fc) & 0x08));
*/ */
/* fixed by David :2006.9.6 */ /* fixed by David :2006.9.6 */
qc_included = ((WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA) && qc_included = (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA) &&
(WLAN_FC_GET_STYPE(fc) & 0x80)); (WLAN_FC_GET_STYPE(fc) & 0x80);
aad_len = 22; aad_len = 22;
if (a4_included) if (a4_included)
aad_len += 6; aad_len += 6;
......
...@@ -877,7 +877,7 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee, ...@@ -877,7 +877,7 @@ static struct sk_buff *ieee80211_assoc_resp(struct ieee80211_device *ieee,
crypt = ieee->crypt[ieee->tx_keyidx]; crypt = ieee->crypt[ieee->tx_keyidx];
else crypt = NULL; else crypt = NULL;
encrypt = (crypt && crypt->ops); encrypt = crypt && crypt->ops;
if (encrypt) if (encrypt)
assoc->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY); assoc->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
......
...@@ -2078,10 +2078,10 @@ static u8 rtl8192_getSupportedWireleeMode(struct net_device *dev) ...@@ -2078,10 +2078,10 @@ static u8 rtl8192_getSupportedWireleeMode(struct net_device *dev)
case RF_8225: case RF_8225:
case RF_8256: case RF_8256:
case RF_PSEUDO_11N: case RF_PSEUDO_11N:
ret = (WIRELESS_MODE_N_24G|WIRELESS_MODE_G|WIRELESS_MODE_B); ret = WIRELESS_MODE_N_24G|WIRELESS_MODE_G|WIRELESS_MODE_B;
break; break;
case RF_8258: case RF_8258:
ret = (WIRELESS_MODE_A|WIRELESS_MODE_N_5G); ret = WIRELESS_MODE_A|WIRELESS_MODE_N_5G;
break; break;
default: default:
ret = WIRELESS_MODE_B; ret = WIRELESS_MODE_B;
...@@ -2687,7 +2687,7 @@ static bool rtl8192_adapter_start(struct net_device *dev) ...@@ -2687,7 +2687,7 @@ static bool rtl8192_adapter_start(struct net_device *dev)
read_nic_dword(dev, CPU_GEN, &dwRegRead); read_nic_dword(dev, CPU_GEN, &dwRegRead);
if (priv->LoopbackMode == RTL819xU_NO_LOOPBACK) if (priv->LoopbackMode == RTL819xU_NO_LOOPBACK)
dwRegRead = ((dwRegRead & CPU_GEN_NO_LOOPBACK_MSK) | CPU_GEN_NO_LOOPBACK_SET); dwRegRead = (dwRegRead & CPU_GEN_NO_LOOPBACK_MSK) | CPU_GEN_NO_LOOPBACK_SET;
else if (priv->LoopbackMode == RTL819xU_MAC_LOOPBACK) else if (priv->LoopbackMode == RTL819xU_MAC_LOOPBACK)
dwRegRead |= CPU_CCK_LOOPBACK; dwRegRead |= CPU_CCK_LOOPBACK;
else else
...@@ -3643,7 +3643,7 @@ static u8 HwRateToMRate90(bool bIsHT, u8 rate) ...@@ -3643,7 +3643,7 @@ static u8 HwRateToMRate90(bool bIsHT, u8 rate)
ret_rate = MGN_MCS15; ret_rate = MGN_MCS15;
break; break;
case DESC90_RATEMCS32: case DESC90_RATEMCS32:
ret_rate = (0x80|0x20); ret_rate = 0x80|0x20;
break; break;
default: default:
...@@ -4228,9 +4228,9 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb, ...@@ -4228,9 +4228,9 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
praddr = hdr->addr1; praddr = hdr->addr1;
/* Check if the received packet is acceptable. */ /* Check if the received packet is acceptable. */
bpacket_match_bssid = ((IEEE80211_FTYPE_CTL != type) && bpacket_match_bssid = (IEEE80211_FTYPE_CTL != type) &&
(eqMacAddr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : hdr->addr3)) (eqMacAddr(priv->ieee80211->current_network.bssid, (fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : hdr->addr3))
&& (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV)); && (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV);
bpacket_toself = bpacket_match_bssid & (eqMacAddr(praddr, priv->ieee80211->dev->dev_addr)); bpacket_toself = bpacket_match_bssid & (eqMacAddr(praddr, priv->ieee80211->dev->dev_addr));
if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BEACON) if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BEACON)
......
...@@ -717,7 +717,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev) ...@@ -717,7 +717,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
if (tmpCCK40Mindex >= CCK_Table_length) if (tmpCCK40Mindex >= CCK_Table_length)
tmpCCK40Mindex = CCK_Table_length-1; tmpCCK40Mindex = CCK_Table_length-1;
} else { } else {
tmpval = ((u8)tmpRegA - priv->ThermalMeter[0]); tmpval = (u8)tmpRegA - priv->ThermalMeter[0];
if (tmpval >= 6) /* higher temperature */ if (tmpval >= 6) /* higher temperature */
tmpOFDMindex = tmpCCK20Mindex = 0; /* max to +6dB */ tmpOFDMindex = tmpCCK20Mindex = 0; /* max to +6dB */
...@@ -2270,10 +2270,10 @@ static void dm_check_edca_turbo( ...@@ -2270,10 +2270,10 @@ static void dm_check_edca_turbo(
/* For Each time updating EDCA parameter, reset EDCA turbo mode status. */ /* For Each time updating EDCA parameter, reset EDCA turbo mode status. */
dm_init_edca_turbo(dev); dm_init_edca_turbo(dev);
u1bAIFS = qos_parameters->aifs[0] * ((mode&(IEEE_G|IEEE_N_24G)) ? 9 : 20) + aSifsTime; u1bAIFS = qos_parameters->aifs[0] * ((mode&(IEEE_G|IEEE_N_24G)) ? 9 : 20) + aSifsTime;
u4bAcParam = ((((u32)(qos_parameters->tx_op_limit[0])) << AC_PARAM_TXOP_LIMIT_OFFSET)| u4bAcParam = (((u32)(qos_parameters->tx_op_limit[0])) << AC_PARAM_TXOP_LIMIT_OFFSET)|
(((u32)(qos_parameters->cw_max[0])) << AC_PARAM_ECW_MAX_OFFSET)| (((u32)(qos_parameters->cw_max[0])) << AC_PARAM_ECW_MAX_OFFSET)|
(((u32)(qos_parameters->cw_min[0])) << AC_PARAM_ECW_MIN_OFFSET)| (((u32)(qos_parameters->cw_min[0])) << AC_PARAM_ECW_MIN_OFFSET)|
((u32)u1bAIFS << AC_PARAM_AIFS_OFFSET)); ((u32)u1bAIFS << AC_PARAM_AIFS_OFFSET);
/*write_nic_dword(dev, WDCAPARA_ADD[i], u4bAcParam);*/ /*write_nic_dword(dev, WDCAPARA_ADD[i], u4bAcParam);*/
write_nic_dword(dev, EDCAPARA_BE, u4bAcParam); write_nic_dword(dev, EDCAPARA_BE, u4bAcParam);
......
...@@ -823,8 +823,8 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev) ...@@ -823,8 +823,8 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
write_nic_byte_E(dev, 0x5e, 0x00); write_nic_byte_E(dev, 0x5e, 0x00);
if (priv->card_8192_version == (u8)VERSION_819xU_A) { if (priv->card_8192_version == (u8)VERSION_819xU_A) {
/* Antenna gain offset from B/C/D to A */ /* Antenna gain offset from B/C/D to A */
reg_u32 = (priv->AntennaTxPwDiff[1]<<4 | reg_u32 = priv->AntennaTxPwDiff[1]<<4 |
priv->AntennaTxPwDiff[0]); priv->AntennaTxPwDiff[0];
rtl8192_setBBreg(dev, rFPGA0_TxGainStage, (bXBTxAGC|bXCTxAGC), rtl8192_setBBreg(dev, rFPGA0_TxGainStage, (bXBTxAGC|bXCTxAGC),
reg_u32); reg_u32);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment