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


Groups > linux.kernel > #1234633

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

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] staging: comedi: ni_tiocmd: remove unused code
Date 2015-09-29 03:50 +0200
Message-ID <qdSdk-kl-9@gated-at.bofh.it> (permalink)
References <qdNGG-2fW-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Sep 28, 2015 at 09:54:45PM +0100, Luis de Bethencourt wrote:
> Remove the unused code, which isn't implemented yet, using #if 0.
> 
> Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
> ---
> 
> Hi,
> 
> The code after the return is dead code. My understanding is that it is
> there for when the output commands are implemented in the future.
> Meanwhile it would be clearer if the code is removed with #if 0.
> 
> Thanks,
> Luis
> 
>  drivers/staging/comedi/drivers/ni_tiocmd.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c b/drivers/staging/comedi/drivers/ni_tiocmd.c
> index 9b124b0..728c7f4 100644
> --- a/drivers/staging/comedi/drivers/ni_tiocmd.c
> +++ b/drivers/staging/comedi/drivers/ni_tiocmd.c
> @@ -158,11 +158,13 @@ static int ni_tio_output_cmd(struct comedi_subdevice *s)
>  		"output commands not yet implemented.\n");
>  	return -ENOTSUPP;
>  
> +#if 0 /* unused */
>  	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);
> +#endif

That's not clear at all, if the code isn't needed, let's just delete it,
why is it here at all?

thanks,

greg k-h
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] staging: comedi: ni_tiocmd: remove unused code Luis de Bethencourt <luisbg@osg.samsung.com> - 2015-09-28 23:00 +0200
  [PATCH] staging: comedi: cb_pcidas64: remove unused code Luis de Bethencourt <luisbg@osg.samsung.com> - 2015-09-28 23:20 +0200
    Re: [PATCH] staging: comedi: cb_pcidas64: remove unused code Greg KH <gregkh@linuxfoundation.org> - 2015-09-29 03:50 +0200
      Re: [PATCH] staging: comedi: cb_pcidas64: remove unused code Luis de Bethencourt <luisbg@osg.samsung.com> - 2015-09-29 12:00 +0200
  [PATCH] staging: rtl8712: remove dead code Luis de Bethencourt <luisbg@osg.samsung.com> - 2015-09-29 00:00 +0200
    Re: [PATCH] staging: rtl8712: remove dead code Joshua Clayton <stillcompiling@gmail.com> - 2015-09-30 07:40 +0200
  Re: [PATCH] staging: comedi: ni_tiocmd: remove unused code Greg KH <gregkh@linuxfoundation.org> - 2015-09-29 03:50 +0200

csiph-web