[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1422481377-31112-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Wed, 28 Jan 2015 22:42:57 +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>,
Chase Southwood <chase.southwood@...il.com>,
Conrad Meyer <cemeyer@...edu>, Fred Akers <knivey@...ops.net>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: comedi: drivers: addi-data: hwdrv_apci1500: Change variables that is never used
Variable ar assigned a value that is never used.
Instead use the struct variable of the same name.
This was found using a static code analysis program called cppcheck
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
index bfa9228..faa71a9 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c
@@ -467,8 +467,6 @@ static int apci1500_di_write(struct comedi_device *dev,
unsigned int *data)
{
struct apci1500_private *devpriv = dev->private;
- int i_Event1InterruptStatus = 0, i_Event2InterruptStatus =
- 0, i_RegValue;
switch (data[0]) {
case START:
@@ -499,11 +497,9 @@ static int apci1500_di_write(struct comedi_device *dev,
outb(0xF4,
devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
- i_Event1InterruptStatus = 1;
outb(APCI1500_RW_PORT_A_SPECIFICATION,
devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
- i_RegValue =
inb(devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
@@ -549,7 +545,6 @@ static int apci1500_di_write(struct comedi_device *dev,
outb(0xD0,
devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
- i_Event2InterruptStatus = 1;
} else {
dev_warn(dev->class_dev,
"Event 2 not initialised\n");
@@ -592,7 +587,6 @@ static int apci1500_di_write(struct comedi_device *dev,
outb(0xF4,
devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
- i_Event1InterruptStatus = 0;
} else {
dev_warn(dev->class_dev,
"Event 1 not initialised\n");
@@ -621,7 +615,6 @@ static int apci1500_di_write(struct comedi_device *dev,
outb(0xF4,
devpriv->iobase +
APCI1500_Z8536_CONTROL_REGISTER);
- i_Event2InterruptStatus = 0;
} else {
dev_warn(dev->class_dev,
@@ -1896,7 +1889,6 @@ static int apci1500_do_bits(struct comedi_device *dev,
unsigned int *data)
{
struct apci1500_private *devpriv = dev->private;
- unsigned int ui_Status;
int i_RegValue;
int i_Constant;
@@ -2004,8 +1996,8 @@ static int apci1500_do_bits(struct comedi_device *dev,
/* Enables the PCI interrupt */
outl(0x3000, devpriv->i_IobaseAmcc + 0x38);
- ui_Status = inl(devpriv->i_IobaseAmcc + 0x10);
- ui_Status = inl(devpriv->i_IobaseAmcc + 0x38);
+ inl(devpriv->i_IobaseAmcc + 0x10);
+ inl(devpriv->i_IobaseAmcc + 0x38);
outl(0x23000, devpriv->i_IobaseAmcc + 0x38);
return insn->n;
--
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