From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755178AbbI2Bpr (ORCPT ); Mon, 28 Sep 2015 21:45:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53192 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754794AbbI2Bpp (ORCPT ); Mon, 28 Sep 2015 21:45:45 -0400 Date: Tue, 29 Sep 2015 03:22:38 +0200 From: Greg KH To: Luis de Bethencourt 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 Message-ID: <20150929012238.GA1252@kroah.com> References: <1443473685-3689-1-git-send-email-luisbg@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1443473685-3689-1-git-send-email-luisbg@osg.samsung.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > > 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