Skip to contentSkip to conversation

Remove unused variables

PATCH In review Anant Thazhemadam 1 participant 2 messages Sep 4, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unused variables

A few unused variables that were defined were found and removed.

---
 drivers/staging/comedi/drivers/dt2814.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/comedi/drivers/dt2814.c +0 -2
index bcf4d5444faf..1a36d8612d9f 100644
@@ -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");
@@ -229,7 +228,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)
Signature · 1 line
2.25.1
#1 lore raw

This patch was generated, and sent by a script I was working on (and apparently, still am), that would run sparse,
detect unused variables and eliminate them. However, upon manual inspection, it became clear
to me that these functions are in fact necessary. I'm sorry this mistake happened. Kindly ignore and discard this patch. My sincere apologies.

Thanks,
Anant

Quoted 31 lines · Anant Thazhemadam

A few unused variables that were defined were found and removed.

---
 drivers/staging/comedi/drivers/dt2814.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/comedi/drivers/dt2814.c +0 -3
index bcf4d5444faf..1a36d8612d9f 100644
@@ -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");
@@ -229,7 +228,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)
--

2.25.1