summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8192e
diff options
context:
space:
mode:
authorGargi Sharma <gs051095@gmail.com>2017-03-11 20:27:20 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-12 14:46:34 +0100
commitcbe7023526d5026e93613dc3694f0c20a2ea8573 (patch)
tree33c1438a7c704e02a70018f5c42559cbbb9a3a5e /drivers/staging/rtl8192e
parenta4a987decb4b12b546d18946e70a7770d5434d80 (diff)
staging: rtl8192e: 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. 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/rtl8192e')
-rw-r--r--drivers/staging/rtl8192e/rtl8192e/rtl_dm.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index d10197464df6..d40621c98506 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -887,10 +887,13 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
tmpCCK40Mindex = CCK_Table_length-1;
} else {
tmpval = (u8)tmpRegA - priv->ThermalMeter[0];
- if (tmpval >= 6)
- tmpOFDMindex = tmpCCK20Mindex = 0;
- else
- tmpOFDMindex = tmpCCK20Mindex = 6 - tmpval;
+ if (tmpval >= 6) {
+ tmpOFDMindex = 0;
+ tmpCCK20Mindex = 0;
+ } else {
+ tmpOFDMindex = 6 - tmpval;
+ tmpCCK20Mindex = 6 - tmpval;
+ }
tmpCCK40Mindex = 0;
}
if (priv->CurrentChannelBW != HT_CHANNEL_WIDTH_20)