staging: rtl8188eu: cleanup brace coding style issues
authorMichael Straube <straube.linux@gmail.com>
Tue, 18 Dec 2018 18:34:51 +0000 (19:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Dec 2018 07:32:33 +0000 (08:32 +0100)
Cleanup brace coding style issues reported by checkpatch.

ERROR: space required before the open brace '{'
WARNING: braces {} are not necessary for single statement blocks
CHECK: Unbalanced braces around else statement

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/core/rtw_security.c
drivers/staging/rtl8188eu/hal/phy.c
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c

index f9cdd1da8addc7377060a04bec1dab28876eac08..407f65cf7150e8fe0909a287dccf09b7a7fb07d4 100644 (file)
@@ -214,9 +214,8 @@ _next:
        pcmdpriv->cmdthd_running = false;
 
        /*  free all cmd_obj resources */
-       while ((pcmd = rtw_dequeue_cmd(&pcmdpriv->cmd_queue))) {
+       while ((pcmd = rtw_dequeue_cmd(&pcmdpriv->cmd_queue)))
                rtw_free_cmd_obj(pcmd);
-       }
 
        complete(&pcmdpriv->terminate_cmdthread_comp);
 
index f7407632e80bdda9d9e49d1548f9900c35038458..364d6ea14bf8190ea28d0ecf5fdfcf8c051572c8 100644 (file)
@@ -1259,7 +1259,7 @@ u32       rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
                                        length = pattrib->last_txcmdsz-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len;
 
                                        aes_cipher(prwskey, pattrib->hdrlen, pframe, length);
-                               } else{
+                               } else {
                                        length = pxmitpriv->frag_len-pattrib->hdrlen-pattrib->iv_len-pattrib->icv_len;
 
                                        aes_cipher(prwskey, pattrib->hdrlen, pframe, length);
@@ -1267,7 +1267,7 @@ u32       rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
                                        pframe = (u8 *)round_up((size_t)(pframe), 8);
                                }
                        }
-               } else{
+               } else {
                        RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("%s: stainfo==NULL!!!\n", __func__));
                        res = _FAIL;
                }
index 051cfbab78b16fc712cdd8a4d2cd485809e301b1..51c40abfafaa160599518d75863a84c0a0420d7f 100644 (file)
@@ -437,9 +437,9 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt)
                        thermal_val = (u8)(thermal_avg / thermal_avg_count);
 
                if (dm_odm->RFCalibrateInfo.bDoneTxpower &&
-                       !dm_odm->RFCalibrateInfo.bReloadtxpowerindex)
+                       !dm_odm->RFCalibrateInfo.bReloadtxpowerindex) {
                        delta = abs(thermal_val - dm_odm->RFCalibrateInfo.ThermalValue);
-               else {
+               else {
                        delta = abs(thermal_val - hal_data->EEPROMThermalMeter);
                        if (dm_odm->RFCalibrateInfo.bReloadtxpowerindex) {
                                dm_odm->RFCalibrateInfo.bReloadtxpowerindex = false;
index b832bbf202a5ad9bce30d19566d0817973d16f0c..7022221136f6672f8b0c6e145f94c8b30c9b0002 100644 (file)
@@ -90,15 +90,14 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p
 
                        /* Write Ext command */
                        msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num * RTL88E_EX_MESSAGE_BOX_SIZE);
-                       for (cmd_idx = 0; cmd_idx < ext_cmd_len; cmd_idx++) {
+                       for (cmd_idx = 0; cmd_idx < ext_cmd_len; cmd_idx++)
                                usb_write8(adapt, msgbox_ex_addr+cmd_idx, *((u8 *)(&h2c_cmd_ex)+cmd_idx));
-                       }
                }
                /*  Write command */
                msgbox_addr = REG_HMEBOX_0 + (h2c_box_num * RTL88E_MESSAGE_BOX_SIZE);
-               for (cmd_idx = 0; cmd_idx < RTL88E_MESSAGE_BOX_SIZE; cmd_idx++) {
+               for (cmd_idx = 0; cmd_idx < RTL88E_MESSAGE_BOX_SIZE; cmd_idx++)
                        usb_write8(adapt, msgbox_addr+cmd_idx, *((u8 *)(&h2c_cmd)+cmd_idx));
-               }
+
                bcmd_down = true;
 
                adapt->HalData->LastHMEBoxNum =
index d5a1cf92ca6f46c1b1d472a05d1e9f79b77bfba5..086f98d38cba054a9ff9b8cbb81c4452305dedfc 100644 (file)
@@ -232,9 +232,8 @@ s32 InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy)
 
                /*  Let last entry point to the start entry of ring buffer */
                status = _LLTWrite(padapter, Last_Entry_Of_TxPktBuf, txpktbuf_bndy);
-               if (status != _SUCCESS) {
+               if (status != _SUCCESS)
                        return status;
-               }
        }
 
        return status;