staging: rtl8192e: remove unnecessary braces for single statement blocks
authorRui Li <me@lirui.org>
Wed, 12 Oct 2022 14:36:33 +0000 (22:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Oct 2022 15:33:52 +0000 (17:33 +0200)
This commit cleans up checkpatch warning as follows:
braces {} are not necessary for single statement blocks

Signed-off-by: Rui Li <me@lirui.org>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/166558541522.9.15423282339326993462.68459319@lirui.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
drivers/staging/rtl8192e/rtllib_softmac_wx.c

index c3dcaa2..210b7ec 100644 (file)
@@ -1106,9 +1106,8 @@ void  rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
        if (cb_desc->bHwSec) {
                static u8 tmp;
 
-               if (!tmp) {
+               if (!tmp)
                        tmp = 1;
-               }
                switch (priv->rtllib->pairwise_key_type) {
                case KEY_TYPE_WEP40:
                case KEY_TYPE_WEP104:
index a44dffa..58da2da 100644 (file)
@@ -522,9 +522,8 @@ static bool _rtl92e_bb_config_para_file(struct net_device *dev)
                rtStatus  = rtl92e_check_bb_and_rf(dev,
                                                   (enum hw90_block)eCheckItem,
                                                   (enum rf90_radio_path)0);
-               if (!rtStatus) {
+               if (!rtStatus)
                        return rtStatus;
-               }
        }
        rtl92e_set_bb_reg(dev, rFPGA0_RFMOD, bCCKEn|bOFDMEn, 0x0);
        _rtl92e_phy_config_bb(dev, BaseBand_Config_PHY_REG);
@@ -1378,9 +1377,8 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
                                        i++;
                                }
 
-                               if (i >= MAX_DOZE_WAITING_TIMES_9x) {
+                               if (i >= MAX_DOZE_WAITING_TIMES_9x)
                                        break;
-                               }
                        }
                        rtl92e_set_rf_off(dev);
                        break;
@@ -1397,9 +1395,8 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
                                        i++;
                                }
 
-                               if (i >= MAX_DOZE_WAITING_TIMES_9x) {
+                               if (i >= MAX_DOZE_WAITING_TIMES_9x)
                                        break;
-                               }
                        }
 
                        if (pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC &&
index f9589c5..fdf867a 100644 (file)
@@ -571,9 +571,8 @@ int rtllib_wx_set_power(struct rtllib_device *ieee,
                ieee->ps = RTLLIB_PS_DISABLED;
                goto exit;
        }
-       if (wrqu->power.flags & IW_POWER_TIMEOUT) {
+       if (wrqu->power.flags & IW_POWER_TIMEOUT)
                ieee->ps_timeout = wrqu->power.value / 1000;
-       }
 
        if (wrqu->power.flags & IW_POWER_PERIOD)
                ieee->ps_period = wrqu->power.value / 1000;