staging: rtl8192u: Remove multiple assignments
PATCH 1/1 staging: rtl8192u: Remove multiple assignments
This patch removes multiple assignments by factorizing them.
This was done with Coccinelle.
@ r1 @
identifier i1,i2;
constant c;
@@
- i1=i2=c;
+ i1=c;
+ i2=c;
--- drivers/staging/rtl8192u/r8192U_dm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/rtl8192u/r8192U_dm.c +4 -2
@@ -725,8 +725,10 @@ 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 */ +if (tmpval >=6 )/* higher temperature */ { + tmpOFDMindex =0 ; + tmpCCK20Mindex =0 ; + }/* max to +6dB */ else tmpOFDMindex = tmpCCK20Mindex =6 - tmpval; tmpCCK40Mindex =0 ;
Signature · 1 line
2.7.4
Quoted 23 lines · Gargi Sharma
This patch removes multiple assignments by factorizing them.
This was done with Coccinelle.
@ r1 @
identifier i1,i2;
constant c;
@@
- i1=i2=c;
+ i1=c;
+ i2=c;Signed-off-by Gargi Sharma <[email protected]>--- drivers/staging/rtl8192u/r8192U_dm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/staging/rtl8192u/r8192U_dm.c +0
-0@@ -725,8 +725,10 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev) }else {
drivers/staging/rtl8192u/r8192U_dm.c static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device *dev) · line 733
Quoted 10 lines
drivers/staging/rtl8192u/r8192U_dm.c +4
-2tmpval = (u8 )tmpRegA - priv->ThermalMeter[0 ]; -if (tmpval >=6 )/* higher temperature */ - tmpOFDMindex = tmpCCK20Mindex =0 ;/* max to +6dB */ +if (tmpval >=6 )/* higher temperature */ { + tmpOFDMindex =0 ; + tmpCCK20Mindex =0 ; + }/* max to +6dB */ else tmpOFDMindex = tmpCCK20Mindex =6 - tmpval;
This one also has an else branch that you can modify. In any case, the else branch needs {}.
julia
Quoted 11 lines
drivers/staging/rtl8192u/r8192U_dm.c +0
-1tmpCCK40Mindex =0 ; --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1489241530-11540-1-git-send-email-gs051095%40gmail.com.
For more options, visit https://groups.google.com/d/optout.