driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: GAURAV PATHAK <gauravpathak129@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
	abbotti@mev.co.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Removing ununsed variable int lo, hi, int data and int i from comedi/drivers/dt2814.c.
Date: Tue, 26 May 2020 20:24:50 +0530	[thread overview]
Message-ID: <20200526145448.GA5197@xebrium.com> (raw)
In-Reply-To: <20200526141346.GV30374@kadam>

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

On Tue, May 26, 2020 at 05:13:46PM +0300, Dan Carpenter wrote:
> Your subject doesn't use the correct patch prefix please use.
> 
> [PATCH] Staging: comedi: dt2814: remove unused assignments
> 
> Please resend a v2.
> 
> Correct the references to Sparse as well like Luc said.
> 
> regards,
> dan carpenter
> 

Hello Dan,
Thank you for reviewing and suggesting changes. I have modified the
patch and attached it with the e-mail to keep this thread conversation.
I hope I have made the changes correctly.

Thanks,
Gaurav

[-- Attachment #2: 0001-Staging-comedi-dt2814-remove-unused-assignments.patch --]
[-- Type: text/x-diff, Size: 2347 bytes --]

From ef4a63e66fc09052c4cad808755d1142a9af7011 Mon Sep 17 00:00:00 2001
From: Gaurav Pathak <gauravpathak129@gmail.com>
Date: Sun, 24 May 2020 17:06:16 +0530
Subject: [PATCH v2] Staging: comedi: dt2814: remove unused assignments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Silence following compiler 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]
  int data;
      ^~~~
drivers/staging/comedi/drivers/dt2814.c: In function ‘dt2814_attach’:
drivers/staging/comedi/drivers/dt2814.c:232:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
  int i;
      ^

Signed-off-by: Gaurav Pathak <gauravpathak129@gmail.com>
---
 drivers/staging/comedi/drivers/dt2814.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
index d2c715737361..eea587d63e18 100644
--- a/drivers/staging/comedi/drivers/dt2814.c
+++ b/drivers/staging/comedi/drivers/dt2814.c
@@ -186,22 +186,15 @@ 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);
-
 	if (!(--devpriv->ntrig)) {
 		int i;
 
@@ -229,7 +222,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)
@@ -241,8 +233,6 @@ 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);
 
 	if (it->options[1]) {
 		ret = request_irq(it->options[1], dt2814_interrupt, 0,
-- 
2.17.1


[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2020-05-26 14:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24 11:36 [PATCH] Removing ununsed variable int lo, hi, int data and int i from comedi/drivers/dt2814.c Gaurav Pathak
2020-05-24 12:10 ` Luc Van Oostenryck
2020-05-24 12:49   ` GAURAV PATHAK
2020-05-24 13:58     ` Luc Van Oostenryck
2020-05-24 13:32   ` GAURAV PATHAK
2020-05-24 14:08     ` Luc Van Oostenryck
2020-05-26 14:13 ` Dan Carpenter
2020-05-26 14:54   ` GAURAV PATHAK [this message]
2020-05-26 15:09     ` Dan Carpenter
2020-05-26 15:50       ` [PATCH v2] Staging: comedi: dt2814: remove unused assignments gaurav
2020-05-26 18:21         ` Dan Carpenter
2020-05-26 18:51           ` [PATCH v3] " Gaurav Pathak
2020-05-26 20:24             ` Dan Carpenter

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=20200526145448.GA5197@xebrium.com \
    --to=gauravpathak129@gmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).