staging: comedi: drivers: comedi_8254: Merge if conditions
PATCH v3 1/5 staging: comedi: drivers: comedi_8254: Merge if conditions
Merge if conditions with the same statements.
Found using Coccinelle. The semantic patch used to find this is as follows:
//<smpl>
@@
statement S;
expression e,x;
@@
* if(e)
(
{ ... return ...; }
&
S
)
* if(x)
(
{ ... return ...; }
&
S
)
//</smpl>
Signed-off-by Amitoj Kaur Chawla <[email protected]>
---
Changes in v3:
-Removed extraneous parentheses.
Changes in v2:
-Merged if conditions instead of dropping them.
drivers/staging/comedi/drivers/comedi_8254.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/comedi/drivers/comedi_8254.c +1 -3
@@ -241,9 +241,7 @@ void comedi_8254_write(struct comedi_8254 *i8254, {unsigned int byte; -if (counter >2 ) -return ; -if (val >0xffff ) +if (counter >2 || val >0xffff )return ;/* load LSB then MSB */
Signature · 1 line
1.9.1