From: Greg KH <gregkh@linuxfoundation.org>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: devel@driverdev.osuosl.org, zhengbin <zhengbin13@huawei.com>,
eric@anholt.net, wahrenst@gmx.net, dan.carpenter@oracle.com
Subject: Re: [PATCH v2 4/6] staging: comedi: Remove set but not used variable 'data'
Date: Tue, 8 Oct 2019 17:12:03 +0200 [thread overview]
Message-ID: <20191008151203.GA2862237@kroah.com> (raw)
In-Reply-To: <706c0f36-d616-3562-84c5-f0582d0bcbe9@mev.co.uk>
On Tue, Oct 08, 2019 at 01:55:01PM +0100, Ian Abbott wrote:
> On 08/10/2019 08:41, zhengbin wrote:
> > Fixes gcc '-Wunused-but-set-variable' warning:
> >
> > drivers/staging/comedi/drivers/dt2814.c: In function dt2814_interrupt:
> > drivers/staging/comedi/drivers/dt2814.c:193:6: warning: variable data set but not used [-Wunused-but-set-variable]
> >
> > It is not used since commit 7806012e97ed ("staging:
> > comedi: refactor dt2814 driver and use module_comedi_driver")
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: zhengbin <zhengbin13@huawei.com>
> > ---
> > drivers/staging/comedi/drivers/dt2814.c | 3 ---
> > 1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
> > index d2c7157..4825168 100644
> > --- a/drivers/staging/comedi/drivers/dt2814.c
> > +++ b/drivers/staging/comedi/drivers/dt2814.c
> > @@ -190,7 +190,6 @@ static irqreturn_t dt2814_interrupt(int irq, void *d)
> > struct comedi_device *dev = d;
> > struct dt2814_private *devpriv = dev->private;
> > struct comedi_subdevice *s = dev->read_subdev;
> > - int data;
> >
> > if (!dev->attached) {
> > dev_err(dev->class_dev, "spurious interrupt\n");
> > @@ -200,8 +199,6 @@ static irqreturn_t dt2814_interrupt(int irq, void *d)
> > hi = inb(dev->iobase + DT2814_DATA);
> > lo = inb(dev->iobase + DT2814_DATA);
> >
> > - data = (hi << 4) | (lo >> 4);
> > -
> > if (!(--devpriv->ntrig)) {
> > int i;
> >
> > --
> > 2.7.4
> >
>
> There is something fishy going on there. The driver ought to be writing the
> data to a buffer.
>
> Can I suggest omitting this patch from the series so I can investigate and
> supply a proper fix?
Now dropped.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2019-10-08 15:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 7:41 [PATCH v2 0/6] staging: Remove a bounch set of set but not used variables zhengbin
2019-10-08 7:40 ` Dan Carpenter
2019-10-08 7:41 ` [PATCH v2 1/6] staging: bcm2835-audio: Need to judge the return value of vchi_msg_dequeue in audio_vchi_callback zhengbin
2019-10-08 7:41 ` [PATCH v2 2/6] staging: sm750fb: Remove set but not used variable 'uiActualPixelClk' zhengbin
2019-10-08 7:41 ` [PATCH v2 3/6] staging: sm750fb: Remove set but not used variable 'actual_mx_clk' zhengbin
2019-10-08 7:41 ` [PATCH v2 4/6] staging: comedi: Remove set but not used variable 'data' zhengbin
2019-10-08 12:55 ` Ian Abbott
2019-10-08 15:12 ` Greg KH [this message]
2019-10-08 7:41 ` [PATCH v2 5/6] staging: comedi: Remove set but not used variable 'hi' zhengbin
2019-10-08 12:56 ` Ian Abbott
2019-10-08 15:12 ` Greg KH
2019-10-08 7:41 ` [PATCH v2 6/6] staging: comedi: Remove set but not used variable 'aref' zhengbin
2019-10-08 12:59 ` Ian Abbott
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=20191008151203.GA2862237@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=abbotti@mev.co.uk \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=eric@anholt.net \
--cc=wahrenst@gmx.net \
--cc=zhengbin13@huawei.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;
as well as URLs for NNTP newsgroup(s).