forked from Minki/linux
staging: rtl8192e: Remove unnecessary parentheses.
Challenge suggested by coccinelle. Remove unnecessary parentheses around the right hand of assignment using the below script. @@ local idexpression id; expression e; @@ id = -( e -) @@ expression e, e1, e2,e3,e4; @@ e = -(((e1) & (e2)) | -(e3 << e4)) +(e1 & e2) | +(e3 << e4) Signed-off-by: Sanjana Sanikommu <sanjana99reddy99@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5c724e197e
commit
3589e74873
@ -81,8 +81,7 @@ void rtl92e_set_bb_reg(struct net_device *dev, u32 dwRegAddr, u32 dwBitMask,
|
||||
if (dwBitMask != bMaskDWord) {
|
||||
OriginalValue = rtl92e_readl(dev, dwRegAddr);
|
||||
BitShift = _rtl92e_calculate_bit_shift(dwBitMask);
|
||||
NewValue = (((OriginalValue) & (~dwBitMask)) |
|
||||
(dwData << BitShift));
|
||||
NewValue = (OriginalValue & ~dwBitMask) | (dwData << BitShift);
|
||||
rtl92e_writel(dev, dwRegAddr, NewValue);
|
||||
} else
|
||||
rtl92e_writel(dev, dwRegAddr, dwData);
|
||||
@ -188,7 +187,7 @@ static void _rtl92e_phy_rf_write(struct net_device *dev,
|
||||
NewOffset = Offset;
|
||||
}
|
||||
|
||||
DataAndAddr = (Data<<16) | (NewOffset&0x3f);
|
||||
DataAndAddr = (NewOffset & 0x3f) | (Data << 16);
|
||||
|
||||
rtl92e_set_bb_reg(dev, pPhyReg->rf3wireOffset, bMaskDWord, DataAndAddr);
|
||||
|
||||
@ -223,8 +222,7 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath,
|
||||
Original_Value = _rtl92e_phy_rf_fw_read(dev, eRFPath,
|
||||
RegAddr);
|
||||
BitShift = _rtl92e_calculate_bit_shift(BitMask);
|
||||
New_Value = (((Original_Value) & (~BitMask)) |
|
||||
(Data << BitShift));
|
||||
New_Value = (Original_Value & ~BitMask) | (Data << BitShift);
|
||||
|
||||
_rtl92e_phy_rf_fw_write(dev, eRFPath, RegAddr,
|
||||
New_Value);
|
||||
@ -237,8 +235,7 @@ void rtl92e_set_rf_reg(struct net_device *dev, enum rf90_radio_path eRFPath,
|
||||
Original_Value = _rtl92e_phy_rf_read(dev, eRFPath,
|
||||
RegAddr);
|
||||
BitShift = _rtl92e_calculate_bit_shift(BitMask);
|
||||
New_Value = (((Original_Value) & (~BitMask)) |
|
||||
(Data << BitShift));
|
||||
New_Value = (Original_Value & ~BitMask) | (Data << BitShift);
|
||||
|
||||
_rtl92e_phy_rf_write(dev, eRFPath, RegAddr, New_Value);
|
||||
} else
|
||||
@ -571,9 +568,9 @@ static bool _rtl92e_bb_config_para_file(struct net_device *dev)
|
||||
|
||||
if (priv->IC_Cut > VERSION_8190_BD) {
|
||||
if (priv->rf_type == RF_2T4R)
|
||||
dwRegValue = (priv->AntennaTxPwDiff[2]<<8 |
|
||||
dwRegValue = priv->AntennaTxPwDiff[2]<<8 |
|
||||
priv->AntennaTxPwDiff[1]<<4 |
|
||||
priv->AntennaTxPwDiff[0]);
|
||||
priv->AntennaTxPwDiff[0];
|
||||
else
|
||||
dwRegValue = 0x0;
|
||||
rtl92e_set_bb_reg(dev, rFPGA0_TxGainStage,
|
||||
@ -655,9 +652,9 @@ void rtl92e_set_tx_power(struct net_device *dev, u8 channel)
|
||||
priv->AntennaTxPwDiff[1] = (u8)(ant_pwr_diff);
|
||||
priv->AntennaTxPwDiff[0] = 0;
|
||||
|
||||
u4RegValue = (priv->AntennaTxPwDiff[2]<<8 |
|
||||
u4RegValue = priv->AntennaTxPwDiff[2]<<8 |
|
||||
priv->AntennaTxPwDiff[1]<<4 |
|
||||
priv->AntennaTxPwDiff[0]);
|
||||
priv->AntennaTxPwDiff[0];
|
||||
|
||||
rtl92e_set_bb_reg(dev, rFPGA0_TxGainStage,
|
||||
(bXBTxAGC|bXCTxAGC|bXDTxAGC),
|
||||
|
Loading…
Reference in New Issue
Block a user