Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234985 > unrolled thread

[PATCH v2] staging: comedi: ni_tiocmd: remove unused code

Started byLuis de Bethencourt <luisbg@osg.samsung.com>
First post2015-09-29 13:30 +0200
Last post2015-09-30 16:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] staging: comedi: ni_tiocmd: remove unused code Luis de Bethencourt <luisbg@osg.samsung.com> - 2015-09-29 13:30 +0200
    Re: [PATCH v2] staging: comedi: ni_tiocmd: remove unused code Ian Abbott <abbotti@mev.co.uk> - 2015-09-30 16:30 +0200

#1234985 — [PATCH v2] staging: comedi: ni_tiocmd: remove unused code

FromLuis de Bethencourt <luisbg@osg.samsung.com>
Date2015-09-29 13:30 +0200
Subject[PATCH v2] staging: comedi: ni_tiocmd: remove unused code
Message-ID<qe1gD-53J-37@gated-at.bofh.it>
Code after a return will never run, removing this dead code.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
---

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(-)

diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c
index 9b124b0..437f723 100644
--- a/drivers/staging/comedi/drivers/ni_tiocmd.c
+++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
@@ -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)
-- 
2.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1236391

FromIan Abbott <abbotti@mev.co.uk>
Date2015-09-30 16:30 +0200
Message-ID<qeqyn-7BV-33@gated-at.bofh.it>
In reply to#1234985
On 29/09/15 12:22, Luis de Bethencourt wrote:
> Code after a return will never run, removing this dead code.
>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> ---
>
> 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(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c
> index 9b124b0..437f723 100644
> --- a/drivers/staging/comedi/drivers/ni_tiocmd.c
> +++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
> @@ -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)
>

Thanks!

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web