diff options
author | G Pooja Shamili | 2016-03-06 10:42:30 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2016-03-12 07:09:09 +0100 |
commit | 1d1b7e87a376d3cc213fdabfefce2734a9999054 (patch) | |
tree | f0db6d57a0f268aa02ef84fff64eb7404723f44b /drivers/staging/rtl8712/rtl871x_mp.c | |
parent | staging: rtl8712: rtl871x_mp_ioctl: Remove exceptional & on function name (diff) | |
download | kernel-qcow2-linux-1d1b7e87a376d3cc213fdabfefce2734a9999054.tar.gz kernel-qcow2-linux-1d1b7e87a376d3cc213fdabfefce2734a9999054.tar.xz kernel-qcow2-linux-1d1b7e87a376d3cc213fdabfefce2734a9999054.zip |
staging: rtl8712: Remove the unnecessary parantheses
The unnecessary parantheses on the right side of assignments were removed,
as in most cases (expect for ==, >=, <=, !=), they are futile.
This was done using Coccinelle, the semantic patch being:
@@
expression E1,E2,E3;
binary operator bin_op = {==,>=,<=,!=};
@@
E1 =
(
(
E2 bin_op E3
)
|
-(
E2
-)
)
;
Signed-off-by: G Pooja Shamili <poojashamili@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_mp.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_mp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_mp.c b/drivers/staging/rtl8712/rtl871x_mp.c index 9b5a4e7ff060..5e4fda1890f5 100644 --- a/drivers/staging/rtl8712/rtl871x_mp.c +++ b/drivers/staging/rtl8712/rtl871x_mp.c @@ -235,7 +235,7 @@ static u8 set_bb_reg(struct _adapter *pAdapter, if (bitmask != bMaskDWord) { org_value = r8712_bb_reg_read(pAdapter, offset); bit_shift = bitshift(bitmask); - new_value = ((org_value & (~bitmask)) | (value << bit_shift)); + new_value = (org_value & (~bitmask)) | (value << bit_shift); } else { new_value = value; } @@ -260,7 +260,7 @@ static u8 set_rf_reg(struct _adapter *pAdapter, u8 path, u8 offset, u32 bitmask, if (bitmask != bMaskDWord) { org_value = r8712_rf_reg_read(pAdapter, path, offset); bit_shift = bitshift(bitmask); - new_value = ((org_value & (~bitmask)) | (value << bit_shift)); + new_value = (org_value & (~bitmask)) | (value << bit_shift); } else { new_value = value; } @@ -327,10 +327,10 @@ void r8712_SetTxAGCOffset(struct _adapter *pAdapter, u32 ulTxAGCOffset) { u32 TxAGCOffset_B, TxAGCOffset_C, TxAGCOffset_D, tmpAGC; - TxAGCOffset_B = (ulTxAGCOffset & 0x000000ff); + TxAGCOffset_B = ulTxAGCOffset & 0x000000ff; TxAGCOffset_C = (ulTxAGCOffset & 0x0000ff00) >> 8; TxAGCOffset_D = (ulTxAGCOffset & 0x00ff0000) >> 16; - tmpAGC = (TxAGCOffset_D << 8 | TxAGCOffset_C << 4 | TxAGCOffset_B); + tmpAGC = TxAGCOffset_D << 8 | TxAGCOffset_C << 4 | TxAGCOffset_B; set_bb_reg(pAdapter, rFPGA0_TxGainStage, (bXBTxAGC | bXCTxAGC | bXDTxAGC), tmpAGC); } |