Skip to contentSkip to conversation

staging: comedi: Merge if conditions

PATCH In review Amitoj Kaur Chawla 2 participants 2 messages Feb 11, 2016 – Feb 12, 2016

lore
Share & tools
lore
#0 lore raw

v3 cover staging: comedi: Merge if conditions

This patchset merges if conditions with the same statements using the following Coccinelle script:

//<smpl>
@@
statement S;
expression e,x;
@@

* if(e)
(
{ ... return ...; }
&
S
)

* if(x)
(
{ ... return ...; }
&
S
)
//</smpl>

Amitoj Kaur Chawla (5):
staging: comedi: drivers: comedi_8254: Merge if conditions
staging: comedi: comedi_fops: Merge if conditions
staging: comedi: range: Merge if conditions
staging: comedi: drivers: dt282x: Merge if conditions
staging: comedi: drivers: pcmuio: Merge if conditions

Changes in v3:
-Removed extraneous parantheses in Patch 1/5 and 2/5

Changes in v2:
-Patch 1/5 Merged if conditions instead of dropping them. -Patch 2/5 Merged Patch 2/6 and 3/6 of first version by not
dropping if conditions and only merging them for the same file.
-Patch 3/5 Removed unnecessary parentheses. -Patch 4/5 and 5/5 While merging use !x || !y instead of
!(x && y)

 drivers/staging/comedi/comedi_fops.c         | 14 +++-----------
 drivers/staging/comedi/drivers/comedi_8254.c |  4 +---
 drivers/staging/comedi/drivers/dt282x.c      |  5 +----
 drivers/staging/comedi/drivers/pcmuio.c      |  5 +----
 drivers/staging/comedi/range.c               |  4 +---
 5 files changed, 7 insertions(+), 25 deletions(-)
Signature · 1 line
1.9.1
#1 lore raw
Quoted 43 lines · Amitoj Kaur Chawla

This patchset merges if conditions with the same statements using the following Coccinelle script:

//<smpl>
@@
statement S;
expression e,x;
@@

* if(e)
(
{ ... return ...; }
&
S
)

* if(x)
(
{ ... return ...; }
&
S
)
//</smpl>

Amitoj Kaur Chawla (5):
staging: comedi: drivers: comedi_8254: Merge if conditions
staging: comedi: comedi_fops: Merge if conditions
staging: comedi: range: Merge if conditions
staging: comedi: drivers: dt282x: Merge if conditions
staging: comedi: drivers: pcmuio: Merge if conditions

Changes in v3:
-Removed extraneous parantheses in Patch 1/5 and 2/5

Changes in v2:
-Patch 1/5 Merged if conditions instead of dropping them. -Patch 2/5 Merged Patch 2/6 and 3/6 of first version by not
dropping if conditions and only merging them for the same file.
-Patch 3/5 Removed unnecessary parentheses. -Patch 4/5 and 5/5 While merging use !x || !y instead of
!(x && y)

Quoted 6 lines
 drivers/staging/comedi/comedi_fops.c         | 14 +++-----------
 drivers/staging/comedi/drivers/comedi_8254.c |  4 +---
 drivers/staging/comedi/drivers/dt282x.c      |  5 +----
 drivers/staging/comedi/drivers/pcmuio.c      |  5 +----
 drivers/staging/comedi/range.c               |  4 +---
 5 files changed, 7 insertions(+), 25 deletions(-)

Sorry I didn't see this version first.

I don't want to take these for the same reasons as before, sorry.

greg k-h