From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761065AbbA3KwK (ORCPT ); Fri, 30 Jan 2015 05:52:10 -0500 Received: from smtp89.iad3a.emailsrvr.com ([173.203.187.89]:41714 "EHLO smtp89.iad3a.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753990AbbA3KwH (ORCPT ); Fri, 30 Jan 2015 05:52:07 -0500 X-Sender-Id: abbotti@mev.co.uk Message-ID: <54CB6253.5080906@mev.co.uk> Date: Fri, 30 Jan 2015 10:52:03 +0000 From: Ian Abbott User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Rickard Strandqvist , H Hartley Sweeten CC: Greg Kroah-Hartman , Bernd Porr , Chase Southwood , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: comedi: drivers: usbduxsigma: Removed variables that is never used References: <1422571809-11476-1-git-send-email-rickard_strandqvist@spectrumdigital.se> In-Reply-To: <1422571809-11476-1-git-send-email-rickard_strandqvist@spectrumdigital.se> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/01/15 22:50, Rickard Strandqvist wrote: > Variable was assigned a value that was never used. > I have also removed all the code that thereby serves no purpose. > > This was found using a static code analysis program called cppcheck > > Signed-off-by: Rickard Strandqvist > --- > drivers/staging/comedi/drivers/usbduxsigma.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c > index dc19435..185f2d1 100644 > --- a/drivers/staging/comedi/drivers/usbduxsigma.c > +++ b/drivers/staging/comedi/drivers/usbduxsigma.c > @@ -215,7 +215,6 @@ static void usbduxsigma_ai_handle_urb(struct comedi_device *dev, > struct usbduxsigma_private *devpriv = dev->private; > struct comedi_async *async = s->async; > struct comedi_cmd *cmd = &async->cmd; > - unsigned int dio_state; > uint32_t val; > int ret; > int i; > @@ -224,9 +223,6 @@ static void usbduxsigma_ai_handle_urb(struct comedi_device *dev, > if (devpriv->ai_counter == 0) { > devpriv->ai_counter = devpriv->ai_timer; > > - /* get the state of the dio pins to allow external trigger */ > - dio_state = be32_to_cpu(devpriv->in_buf[0]); > - > /* get the data from the USB bus and hand it over to comedi */ > for (i = 0; i < cmd->chanlist_len; i++) { > /* transfer data, note first byte is the DIO state */ > Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd. E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-