public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
	abbotti@mev.co.uk, surya.seetharaman9@gmail.com
Subject: Re: [PATCH] staging: comedi: ni_tiocmd: remove unused code
Date: Tue, 29 Sep 2015 03:22:38 +0200	[thread overview]
Message-ID: <20150929012238.GA1252@kroah.com> (raw)
In-Reply-To: <1443473685-3689-1-git-send-email-luisbg@osg.samsung.com>

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

      parent reply	other threads:[~2015-09-29  1:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 20:54 [PATCH] staging: comedi: ni_tiocmd: remove unused code Luis de Bethencourt
2015-09-28 21:10 ` [PATCH] staging: comedi: cb_pcidas64: " Luis de Bethencourt
2015-09-29  1:23   ` Greg KH
2015-09-29  9:55     ` Luis de Bethencourt
2015-09-28 21:52 ` [PATCH] staging: rtl8712: remove dead code Luis de Bethencourt
2015-09-30  5:32   ` Joshua Clayton
2015-09-29  1:22 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150929012238.GA1252@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luisbg@osg.samsung.com \
    --cc=surya.seetharaman9@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox