staging: rtl8723bs: Compress two lines into one line
Challenge suggested by coccinelle. Return value directly without saving it in a variable and remove that variable. Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5b07a3905f
commit
1bba5b2110
|
@ -58,7 +58,7 @@ static u32 phy_CalculateBitShift(u32 BitMask)
|
||||||
*/
|
*/
|
||||||
u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask)
|
u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask)
|
||||||
{
|
{
|
||||||
u32 ReturnValue = 0, OriginalValue, BitShift;
|
u32 OriginalValue, BitShift;
|
||||||
|
|
||||||
#if (DISABLE_BB_RF == 1)
|
#if (DISABLE_BB_RF == 1)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -68,9 +68,8 @@ u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask)
|
||||||
|
|
||||||
OriginalValue = rtw_read32(Adapter, RegAddr);
|
OriginalValue = rtw_read32(Adapter, RegAddr);
|
||||||
BitShift = phy_CalculateBitShift(BitMask);
|
BitShift = phy_CalculateBitShift(BitMask);
|
||||||
ReturnValue = (OriginalValue & BitMask) >> BitShift;
|
|
||||||
|
|
||||||
return ReturnValue;
|
return (OriginalValue & BitMask) >> BitShift;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -284,18 +283,16 @@ u32 PHY_QueryRFReg_8723B(
|
||||||
u32 BitMask
|
u32 BitMask
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
u32 Original_Value, Readback_Value, BitShift;
|
u32 Original_Value, BitShift;
|
||||||
|
|
||||||
#if (DISABLE_BB_RF == 1)
|
#if (DISABLE_BB_RF == 1)
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Original_Value = phy_RFSerialRead_8723B(Adapter, eRFPath, RegAddr);
|
Original_Value = phy_RFSerialRead_8723B(Adapter, eRFPath, RegAddr);
|
||||||
|
|
||||||
BitShift = phy_CalculateBitShift(BitMask);
|
BitShift = phy_CalculateBitShift(BitMask);
|
||||||
Readback_Value = (Original_Value & BitMask) >> BitShift;
|
|
||||||
|
|
||||||
return Readback_Value;
|
return (Original_Value & BitMask) >> BitShift;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue