[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1422484430-8686-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Wed, 28 Jan 2015 23:33:50 +0100
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Ian Abbott <abbotti@....co.uk>,
H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: comedi: drivers: dt2814: Removed variables that is never used
Variable ar assigned a value that is 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 <rickard_strandqvist@...ctrumdigital.se>
---
drivers/staging/comedi/drivers/dt2814.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
index 9805be1..d2e7a4e 100644
--- a/drivers/staging/comedi/drivers/dt2814.c
+++ b/drivers/staging/comedi/drivers/dt2814.c
@@ -198,21 +198,17 @@ static int dt2814_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
static irqreturn_t dt2814_interrupt(int irq, void *d)
{
- int lo, hi;
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");
return IRQ_HANDLED;
}
- hi = inb(dev->iobase + DT2814_DATA);
- lo = inb(dev->iobase + DT2814_DATA);
-
- data = (hi << 4) | (lo >> 4);
+ inb(dev->iobase + DT2814_DATA);
+ inb(dev->iobase + DT2814_DATA);
if (!(--devpriv->ntrig)) {
int i;
@@ -239,7 +235,6 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct dt2814_private *devpriv;
struct comedi_subdevice *s;
int ret;
- int i;
ret = comedi_request_region(dev, it->options[0], 0x2);
if (ret)
@@ -251,8 +246,8 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dev_err(dev->class_dev, "reset error (fatal)\n");
return -EIO;
}
- i = inb(dev->iobase + DT2814_DATA);
- i = inb(dev->iobase + DT2814_DATA);
+ inb(dev->iobase + DT2814_DATA);
+ inb(dev->iobase + DT2814_DATA);
if (it->options[1]) {
ret = request_irq(it->options[1], dt2814_interrupt, 0,
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists