From e1bc88f1d94f1b34ef0ae27d3c6801a6fdac1f60 Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Wed, 4 Mar 2015 07:34:07 +0200 Subject: [PATCH] staging: rtl8723au: remove extra parentheses around right bit shift operations Removes extra parentheses around bitwise right shift operations. The cases handled here are when resultant values are assigned to variables. The issue was detected and resolved using the following coccinelle script: @@ expression e, e1; constant c; @@ e = -(e1 +e1 >> -c); +c; @@ identifier i; constant c; type t; expression e; @@ t i = -(e +e >> -c); +c; @@ expression e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e >> -c) +c ,...); Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/odm.c | 6 +++--- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index 8d4266100ff0..2d3653e784d2 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -736,15 +736,15 @@ void odm_FalseAlarmCounterStatistics23a(struct dm_odm_t *pDM_Odm) ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE1_11N, bMaskDWord); FalseAlmCnt->Cnt_Fast_Fsync = (ret_value&0xffff); - FalseAlmCnt->Cnt_SB_Search_fail = ((ret_value&0xffff0000)>>16); + FalseAlmCnt->Cnt_SB_Search_fail = (ret_value & 0xffff0000)>>16; ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE2_11N, bMaskDWord); FalseAlmCnt->Cnt_OFDM_CCA = (ret_value&0xffff); - FalseAlmCnt->Cnt_Parity_Fail = ((ret_value&0xffff0000)>>16); + FalseAlmCnt->Cnt_Parity_Fail = (ret_value & 0xffff0000)>>16; ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE3_11N, bMaskDWord); FalseAlmCnt->Cnt_Rate_Illegal = (ret_value&0xffff); - FalseAlmCnt->Cnt_Crc8_fail = ((ret_value&0xffff0000)>>16); + FalseAlmCnt->Cnt_Crc8_fail = (ret_value & 0xffff0000)>>16; ret_value = ODM_GetBBReg(pDM_Odm, ODM_REG_OFDM_FA_TYPE4_11N, bMaskDWord); FalseAlmCnt->Cnt_Mcs_fail = (ret_value&0xffff); diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 7b3fdc841aac..ebe33392c8d9 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -751,7 +751,7 @@ void rtl8723a_read_chip_version(struct rtw_adapter *padapter) value32 = rtl8723au_read32(padapter, REG_GPIO_OUTSTS); /* ROM code version. */ - ChipVersion.ROMVer = ((value32 & RF_RL_ID) >> 20); + ChipVersion.ROMVer = (value32 & RF_RL_ID) >> 20; /* For multi-function consideration. Added by Roger, 2010.10.06. */ pHalData->MultiFunc = RT_MULTI_FUNC_NONE; @@ -1728,8 +1728,8 @@ Hal_EfuseParseBTCoexistInfo_8723A(struct rtw_adapter *padapter, /* eeprom spec */ tempval = hwinfo[RF_OPTION4_8723A]; pHalData->EEPROMBluetoothAntNum = (tempval & 0x1); - pHalData->EEPROMBluetoothAntIsolation = ((tempval & 0x10) >> 4); - pHalData->EEPROMBluetoothRadioShared = ((tempval & 0x20) >> 5); + pHalData->EEPROMBluetoothAntIsolation = (tempval & 0x10) >> 4; + pHalData->EEPROMBluetoothRadioShared = (tempval & 0x20) >> 5; } else { pHalData->EEPROMBluetoothCoexist = 0; pHalData->EEPROMBluetoothType = BT_RTL8723A; -- 2.39.5