summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192u
diff options
context:
space:
mode:
authorGargi Sharma <gs051095@gmail.com>2017-03-15 00:13:21 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-16 11:34:53 +0900
commit4cad1589108fc55b1fa9c42ae610337847f2f100 (patch)
tree64b0306a109266352c681691c862ca093a052098 /drivers/staging/rtl8192u
parentadab24a4a785d4bd7f2b2fd25e2129973caff667 (diff)
staging: rtl8192u: Remove multiple assignments
This patch removes multiple assignments by factorizing them. This was done with Coccinelle for the if branch. For the else part the change was done manually since Coccinelle only detects constants. Braces were also added to the else part to remove the checkpatch warning, "braces should be on all arms of if-else statements". @@ identifier i1,i2; constant c; @@ - i1=i2=c; + i1=c; + i2=c; Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r--drivers/staging/rtl8192u/r8192U_dm.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 5a07e7e71549..623d49585bee 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -725,10 +725,15 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev)
} else {
tmpval = (u8)tmpRegA - priv->ThermalMeter[0];
- if (tmpval >= 6) /* higher temperature */
- tmpOFDMindex = tmpCCK20Mindex = 0; /* max to +6dB */
- else
- tmpOFDMindex = tmpCCK20Mindex = 6 - tmpval;
+ if (tmpval >= 6) {
+ /* higher temperature */
+ tmpOFDMindex = 0;
+ tmpCCK20Mindex = 0;
+ } else {
+ /* max to +6dB */
+ tmpOFDMindex = 6 - tmpval;
+ tmpCCK20Mindex = 6 - tmpval;
+ }
tmpCCK40Mindex = 0;
}
/*DbgPrint("%ddb, tmpOFDMindex = %d, tmpCCK20Mindex = %d, tmpCCK40Mindex = %d",