From: Rui Miguel Silva Date: Mon, 28 Apr 2014 11:12:54 +0000 (+0100) Subject: staging: rtl8192u: fix checkpatch braces warning X-Git-Tag: v5.15~17469^2~39^2~1032 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2930d0b977e6b9f66e8f090c685a18991944fca6;p=platform%2Fkernel%2Flinux-starfive.git staging: rtl8192u: fix checkpatch braces warning fix some code style related to the use of braces in a one statement block Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c index d97ad7b..9fa12e4 100644 --- a/drivers/staging/rtl8192u/r8192U_dm.c +++ b/drivers/staging/rtl8192u/r8192U_dm.c @@ -183,9 +183,8 @@ void dm_CheckRxAggregation(struct net_device *dev) { curTxOkCnt = priv->stats.txbytesunicast - lastTxOkCnt; curRxOkCnt = priv->stats.rxbytesunicast - lastRxOkCnt; - if((curTxOkCnt + curRxOkCnt) < 15000000) { + if ((curTxOkCnt + curRxOkCnt) < 15000000) return; - } if(curTxOkCnt > 4*curRxOkCnt) { if (priv->bCurrentRxAggrEnable) { @@ -1646,9 +1645,8 @@ void dm_restore_dynamic_mechanism_state(struct net_device *dev) write_nic_byte(dev, UFWP, 1); } //Restore TX Power Tracking Index - if(priv->btxpower_trackingInit && priv->btxpower_tracking){ + if (priv->btxpower_trackingInit && priv->btxpower_tracking) dm_txpower_reset_recovery(dev); - } // //Restore BB Initial Gain diff --git a/drivers/staging/rtl8192u/r8192U_wx.c b/drivers/staging/rtl8192u/r8192U_wx.c index c70af01..72db773 100644 --- a/drivers/staging/rtl8192u/r8192U_wx.c +++ b/drivers/staging/rtl8192u/r8192U_wx.c @@ -275,9 +275,8 @@ static int rtl8180_wx_get_range(struct net_device *dev, range->num_bitrates = RATE_COUNT; - for (i = 0; i < RATE_COUNT && i < IW_MAX_BITRATES; i++) { + for (i = 0; i < RATE_COUNT && i < IW_MAX_BITRATES; i++) range->bitrate[i] = rtl8180_rates[i]; - } range->min_frag = MIN_FRAG_THRESHOLD; range->max_frag = MAX_FRAG_THRESHOLD; diff --git a/drivers/staging/rtl8192u/r819xU_firmware.c b/drivers/staging/rtl8192u/r819xU_firmware.c index ecfb665..98a113a 100644 --- a/drivers/staging/rtl8192u/r819xU_firmware.c +++ b/drivers/staging/rtl8192u/r819xU_firmware.c @@ -277,13 +277,11 @@ bool init_firmware(struct net_device *dev) * and Tx descriptor info * */ rt_status = fw_download_code(dev,mapped_file,file_length); - if (rst_opt == OPT_SYSTEM_RESET) { + if (rst_opt == OPT_SYSTEM_RESET) release_firmware(fw_entry); - } - if (rt_status != TRUE) { + if (rt_status != TRUE) goto download_firmware_fail; - } switch (init_step) { case FW_INIT_STEP0_BOOT: diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index b9f3531..87e07ba 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -504,9 +504,8 @@ void rtl8192_phy_configmac(struct net_device *dev) pdwArray = rtl819XMACPHY_Array; } for (i = 0; i < dwArrayLen; i = i+3) { - if (pdwArray[i] == 0x318) { + if (pdwArray[i] == 0x318) pdwArray[i+2] = 0x00000800; - } RT_TRACE(COMP_DBG, "Rtl8190MACPHY_Array[0]=%x Rtl8190MACPHY_Array[1]=%x Rtl8190MACPHY_Array[2]=%x\n",