Skip to contentSkip to conversation

staging: comedi: ni_tiocmd: remove unused code

PATCH In review Luis de Bethencourt 2 participants 2 messages Sep 29, 2015 – Sep 30, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: comedi: ni_tiocmd: remove unused code

Code after a return will never run, removing this dead code.

---

Hi,

This is a better fix than the previous patch:
http://lkml.iu.edu/hypermail/linux/kernel/1509.3/02741.html

Suggestion of just removing the dead code was in:
http://lkml.iu.edu/hypermail/linux/kernel/1509.3/02939.html

Thanks,
Luis

 drivers/staging/comedi/drivers/ni_tiocmd.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/staging/comedi/drivers/ni_tiocmd.c +0 -6
index 9b124b0..437f723 100644
@@ -157,12 +157,6 @@ static int ni_tio_output_cmd(struct comedi_subdevice *s)
 	dev_err(counter->counter_dev->dev->class_dev,
 		"output commands not yet implemented.\n");
 	return -ENOTSUPP;
-
-	counter->mite_chan->dir = COMEDI_OUTPUT;
-	mite_prep_dma(counter->mite_chan, 32, 32);
-	ni_tio_configure_dma(counter, true, false);
-	mite_dma_arm(counter->mite_chan);
-	return ni_tio_arm(counter, 1, NI_GPCT_ARM_IMMEDIATE);
 }
 
 static int ni_tio_cmd_setup(struct comedi_subdevice *s)
Signature · 1 line
2.5.3
Reviewed-by on v2 1/1
#1 lore raw
Quoted 28 lines · Luis de Bethencourt

Code after a return will never run, removing this dead code.

---

Hi,

This is a better fix than the previous patch:
http://lkml.iu.edu/hypermail/linux/kernel/1509.3/02741.html

Suggestion of just removing the dead code was in:
http://lkml.iu.edu/hypermail/linux/kernel/1509.3/02939.html

Thanks,
Luis

  drivers/staging/comedi/drivers/ni_tiocmd.c | 6 ------
  1 file changed, 6 deletions(-)
drivers/staging/comedi/drivers/ni_tiocmd.c +0 -0
index 9b124b0..437f723 100644
@@ -157,12 +157,6 @@ static int ni_tio_output_cmd(struct comedi_subdevice *s)
  	dev_err(counter->counter_dev->dev->class_dev,
  		"output commands not yet implemented.\n");

drivers/staging/comedi/drivers/ni_tiocmd.c static int ni_tio_output_cmd(struct comedi_subdevice *s) · line 162

Quoted 10 lines
drivers/staging/comedi/drivers/ni_tiocmd.c +0 -6
  	return -ENOTSUPP;
-
-	counter->mite_chan->dir = COMEDI_OUTPUT;
-	mite_prep_dma(counter->mite_chan, 32, 32);
-	ni_tio_configure_dma(counter, true, false);
-	mite_dma_arm(counter->mite_chan);
-	return ni_tio_arm(counter, 1, NI_GPCT_ARM_IMMEDIATE);
  }
 
  static int ni_tio_cmd_setup(struct comedi_subdevice *s)

Thanks!

Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-