]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: rtlwifi: rtl8822be: Remove useless parentheses
authorFrank A. Cancio Bello <frank@generalsoftwareinc.com>
Wed, 18 Oct 2017 03:35:51 +0000 (23:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 13:33:15 +0000 (15:33 +0200)
Remove unnecessary parentheses to comply with preferred coding style for
the linux kernel and avoid the following checkpatch's message:
'CHECK: Unnecessary parentheses around'.

Credits to checkpatch.

Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/rtl8822be/fw.c
drivers/staging/rtlwifi/rtl8822be/led.c
drivers/staging/rtlwifi/rtl8822be/phy.c
drivers/staging/rtlwifi/rtl8822be/trx.c

index 02f5004a9a0c981ecae379eb6916811367eaa858..fa62983fc26710c5e5b0926ac33e3736fdf6acdf 100644 (file)
@@ -330,7 +330,7 @@ void rtl8822be_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode)
                        byte5 = btc_ops->btc_get_lps_val(rtlpriv);
                        power_state = btc_ops->btc_get_rpwm_val(rtlpriv);
 
-                       if ((rlbm == 2) && (byte5 & BIT(4))) {
+                       if (rlbm == 2 && (byte5 & BIT(4))) {
                                /* Keep awake interval to 1 to prevent from
                                 * decreasing coex performance
                                 */
@@ -835,7 +835,7 @@ void rtl8822be_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
                        rtl_write_dword(rtlpriv, 0x5EC,
                                        p2pinfo->noa_count_type[i]);
                }
-               if ((p2pinfo->opp_ps == 1) || (p2pinfo->noa_num > 0)) {
+               if (p2pinfo->opp_ps == 1 || p2pinfo->noa_num > 0) {
                        /* rst p2p circuit */
                        rtl_write_byte(rtlpriv, REG_DUAL_TSF_RST_8822B, BIT(4));
                        p2p_ps_offload->offload_en = 1;
index f4b5af8ab1165d50bf24e5e7f11e893b986fd54c..0054c892dce6d1367616d3cb06565419b56a3f2a 100644 (file)
@@ -114,7 +114,7 @@ void rtl8822be_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction)
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 
-       if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) &&
+       if (ppsc->rfoff_reason > RF_CHANGE_BY_PS &&
            (ledaction == LED_CTL_TX || ledaction == LED_CTL_RX ||
             ledaction == LED_CTL_SITE_SURVEY || ledaction == LED_CTL_LINK ||
             ledaction == LED_CTL_NO_LINK ||
index 589ef1584a8f404c1171d02226e39bd5c3d2d6fe..aacaca6b968eca9e88544c6bc161b53e3d95f505 100644 (file)
@@ -1610,9 +1610,9 @@ u8 rtl8822be_get_txpower_index(struct ieee80211_hw *hw, u8 path, u8 rate,
        char limit;
        char powerdiff_byrate = 0;
 
-       if (((rtlhal->current_bandtype == BAND_ON_2_4G) &&
+       if ((rtlhal->current_bandtype == BAND_ON_2_4G &&
             (channel > 14 || channel < 1)) ||
-           ((rtlhal->current_bandtype == BAND_ON_5G) && (channel <= 14))) {
+           (rtlhal->current_bandtype == BAND_ON_5G && channel <= 14)) {
                index = 0;
                RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
                         "Illegal channel!!\n");
@@ -1913,8 +1913,8 @@ static u8 _rtl8822be_phy_get_pri_ch_id(struct rtl_priv *rtlpriv)
 
        if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) {
                /* primary channel is at lower subband of 80MHz & 40MHz */
-               if ((mac->cur_40_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER) &&
-                   (mac->cur_80_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER)) {
+               if (mac->cur_40_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER &&
+                   mac->cur_80_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER) {
                        pri_ch_idx = VHT_DATA_SC_20_LOWEST_OF_80MHZ;
                /* primary channel is at
                 * lower subband of 80MHz & upper subband of 40MHz
@@ -2142,7 +2142,7 @@ static bool _rtl8822be_phy_set_rf_power_state(struct ieee80211_hw *hw,
 
        switch (rfpwr_state) {
        case ERFON:
-               if ((ppsc->rfpwr_state == ERFOFF) &&
+               if (ppsc->rfpwr_state == ERFOFF &&
                    RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) {
                        bool rtstatus = false;
                        u32 initialize_count = 0;
index 54f65f35474b397d62c5165e1ea292cc318bd207..87e15e4192527ecbc2353b487eed597c2b79f12f 100644 (file)
@@ -165,7 +165,7 @@ static bool rtl8822be_get_rxdesc_is_ht(struct ieee80211_hw *hw, u8 *pdesc)
 
        RT_TRACE(rtlpriv, COMP_RXDESC, DBG_LOUD, "rx_rate=0x%02x.\n", rx_rate);
 
-       if ((rx_rate >= DESC_RATEMCS0) && (rx_rate <= DESC_RATEMCS15))
+       if (rx_rate >= DESC_RATEMCS0 && rx_rate <= DESC_RATEMCS15)
                return true;
        else
                return false;
@@ -193,8 +193,8 @@ static u8 rtl8822be_get_rx_vht_nss(struct ieee80211_hw *hw, u8 *pdesc)
 
        rx_rate = GET_RX_DESC_RX_RATE(pdesc);
 
-       if ((rx_rate >= DESC_RATEVHT1SS_MCS0) &&
-           (rx_rate <= DESC_RATEVHT1SS_MCS9))
+       if (rx_rate >= DESC_RATEVHT1SS_MCS0 &&
+           rx_rate <= DESC_RATEVHT1SS_MCS9)
                vht_nss = 1;
        else if ((rx_rate >= DESC_RATEVHT2SS_MCS0) &&
                 (rx_rate <= DESC_RATEVHT2SS_MCS9))
@@ -510,8 +510,8 @@ static u8 rtl8822be_bw_mapping(struct ieee80211_hw *hw,
                else
                        bw_setting_of_desc = 0;
        } else if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
-               if ((ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_20_40) ||
-                   (ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_80))
+               if (ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_20_40 ||
+                   ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_80)
                        bw_setting_of_desc = 1;
                else
                        bw_setting_of_desc = 0;
@@ -546,10 +546,10 @@ static u8 rtl8822be_sc_mapping(struct ieee80211_hw *hw,
                                         "%s: Not Correct Primary40MHz Setting\n",
                                         __func__);
                } else {
-                       if ((mac->cur_40_prime_sc ==
-                            HAL_PRIME_CHNL_OFFSET_LOWER) &&
-                           (mac->cur_80_prime_sc ==
-                            HAL_PRIME_CHNL_OFFSET_LOWER))
+                       if (mac->cur_40_prime_sc ==
+                            HAL_PRIME_CHNL_OFFSET_LOWER &&
+                           mac->cur_80_prime_sc ==
+                            HAL_PRIME_CHNL_OFFSET_LOWER)
                                sc_setting_of_desc =
                                        VHT_DATA_SC_20_LOWEST_OF_80MHZ;
                        else if ((mac->cur_40_prime_sc ==