Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932500AbbBJNBt (ORCPT ); Tue, 10 Feb 2015 08:01:49 -0500 Received: from smtp81.ord1c.emailsrvr.com ([108.166.43.81]:47554 "EHLO smtp81.ord1c.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755887AbbBJNBq (ORCPT ); Tue, 10 Feb 2015 08:01:46 -0500 X-Sender-Id: pushpendra.singh@smartplayin.com From: Pushpendra Singh To: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Cc: navin.patidar@gmail.com, gmate.amit@gmail.com, manuel.schoelling@gmx.de, Pushpendra Singh Subject: [PATCH 3/6] staging: rtl8188eu: hal: removed unnecessary braces Date: Tue, 10 Feb 2015 18:32:50 +0530 Message-Id: <1423573373-820-3-git-send-email-pushpendra.singh@smartplayin.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423573373-820-1-git-send-email-pushpendra.singh@smartplayin.com> References: <1423573373-820-1-git-send-email-pushpendra.singh@smartplayin.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7431 Lines: 204 Removed checkpatch.pl below warning WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Pushpendra Singh --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 15 +++++++-------- drivers/staging/rtl8188eu/hal/fw.c | 3 +-- drivers/staging/rtl8188eu/hal/odm_HWConfig.c | 5 ++--- drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 3 +-- drivers/staging/rtl8188eu/hal/phy.c | 12 ++++-------- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 6 ++---- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 3 +-- drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 +-- 8 files changed, 19 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c index 1e963bf..76d3db1 100644 --- a/drivers/staging/rtl8188eu/hal/bb_cfg.c +++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c @@ -554,21 +554,20 @@ static void store_pwrindex_offset(struct adapter *Adapter, u32 regaddr, u32 bitm static void rtl_addr_delay(struct adapter *adapt, u32 addr, u32 bit_mask, u32 data) { - if (addr == 0xfe) { + if (addr == 0xfe) msleep(50); - } else if (addr == 0xfd) { + else if (addr == 0xfd) mdelay(5); - } else if (addr == 0xfc) { + else if (addr == 0xfc) mdelay(1); - } else if (addr == 0xfb) { + else if (addr == 0xfb) udelay(50); - } else if (addr == 0xfa) { + else if (addr == 0xfa) udelay(5); - } else if (addr == 0xf9) { + else if (addr == 0xf9) udelay(1); - } else{ + else store_pwrindex_offset(adapt, addr, bit_mask, data); - } } static bool config_bb_with_pgheader(struct adapter *adapt) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 3b28754..a71c542 100644 --- a/drivers/staging/rtl8188eu/hal/fw.c +++ b/drivers/staging/rtl8188eu/hal/fw.c @@ -154,9 +154,8 @@ static int _rtl88e_fw_free_to_go(struct adapter *adapt) break; } while (counter++ < POLLING_READY_TIMEOUT_COUNT); - if (counter >= POLLING_READY_TIMEOUT_COUNT) { + if (counter >= POLLING_READY_TIMEOUT_COUNT) goto exit; - } value32 = usb_read32(adapt, REG_MCUFWDL); value32 |= MCUFWDL_RDY; diff --git a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c index 29f87df..7213187 100644 --- a/drivers/staging/rtl8188eu/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8188eu/hal/odm_HWConfig.c @@ -418,11 +418,10 @@ static void ODM_PhyStatusQuery_92CSeries(struct odm_dm_struct *dm_odm, { odm_RxPhyStatus92CSeries_Parsing(dm_odm, pPhyInfo, pPhyStatus, pPktinfo); - if (dm_odm->RSSI_test) { + if (dm_odm->RSSI_test) ;/* Select the packets to do RSSI checking for antenna switching. */ - } else { + else odm_Process_RSSIForDM(dm_odm, pPhyInfo, pPktinfo); - } } void ODM_PhyStatusQuery(struct odm_dm_struct *dm_odm, diff --git a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c index d3c6873..fd7930f 100644 --- a/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c +++ b/drivers/staging/rtl8188eu/hal/odm_RTL8188E.c @@ -103,9 +103,8 @@ static void dm_fast_training_init(struct odm_dm_struct *dm_odm) struct fast_ant_train *dm_fat_tbl = &dm_odm->DM_FatTable; u32 AntCombination = 2; - if (*(dm_odm->mp_mode) == 1) { + if (*(dm_odm->mp_mode) == 1) return; - } for (i = 0; i < 6; i++) { dm_fat_tbl->Bssid[i] = 0; diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index 3f663fe..0a1a7d6 100644 --- a/drivers/staging/rtl8188eu/hal/phy.c +++ b/drivers/staging/rtl8188eu/hal/phy.c @@ -991,9 +991,8 @@ static void save_adda_registers(struct adapter *adapt, u32 *addareg, { u32 i; - for (i = 0; i < register_num; i++) { + for (i = 0; i < register_num; i++) backup[i] = phy_query_bb_reg(adapt, addareg[i], bMaskDWord); - } } static void save_mac_registers(struct adapter *adapt, u32 *mac_reg, @@ -1001,9 +1000,8 @@ static void save_mac_registers(struct adapter *adapt, u32 *mac_reg, { u32 i; - for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) { + for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) backup[i] = usb_read8(adapt, mac_reg[i]); - } backup[i] = usb_read32(adapt, mac_reg[i]); } @@ -1021,9 +1019,8 @@ static void reload_mac_registers(struct adapter *adapt, { u32 i; - for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) { + for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) usb_write8(adapt, mac_reg[i], (u8)backup[i]); - } usb_write32(adapt, mac_reg[i], backup[i]); } @@ -1051,9 +1048,8 @@ static void mac_setting_calibration(struct adapter *adapt, u32 *mac_reg, u32 *ba usb_write8(adapt, mac_reg[i], 0x3F); - for (i = 1; i < (IQK_MAC_REG_NUM - 1); i++) { + for (i = 1; i < (IQK_MAC_REG_NUM - 1); i++) usb_write8(adapt, mac_reg[i], (u8)(backup[i]&(~BIT3))); - } usb_write8(adapt, mac_reg[i], (u8)(backup[i]&(~BIT5))); } diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index 86347f2..cf2609f 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c @@ -104,15 +104,13 @@ 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; haldata->LastHMEBoxNum = (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 1aae302..c727a78 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -303,9 +303,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 (_SUCCESS != status) { + if (_SUCCESS != status) return status; - } } return status; diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 0078468..5665a7d 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -716,9 +716,8 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) /* Save target channel */ haldata->CurrentChannel = 6;/* default set to 6 */ - if (pwrctrlpriv->reg_rfoff) { + if (pwrctrlpriv->reg_rfoff) pwrctrlpriv->rf_pwrstate = rf_off; - } /* 2010/08/09 MH We need to check if we need to turnon or off RF after detecting */ /* HW GPIO pin. Before PHY_RFConfig8192C. */ -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/