driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: zhengbin <zhengbin13@huawei.com>
To: <gregkh@linuxfoundation.org>, <eric@anholt.net>,
	<wahrenst@gmx.net>, <abbotti@mev.co.uk>,
	<hsweeten@visionengravers.com>, <dan.carpenter@oracle.com>,
	<devel@driverdev.osuosl.org>
Cc: zhengbin13@huawei.com
Subject: [PATCH v2 5/6] staging: comedi: Remove set but not used variable 'hi'
Date: Tue, 8 Oct 2019 15:41:54 +0800	[thread overview]
Message-ID: <1570520515-2186-6-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1570520515-2186-1-git-send-email-zhengbin13@huawei.com>

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/staging/comedi/drivers/dt2815.c: In function dt2815_ao_insn:
drivers/staging/comedi/drivers/dt2815.c:91:19: warning: variable hi set but not used [-Wunused-but-set-variable]

It is not used since commit d6a929b7608a ("Staging:
comedi: add dt2815 driver")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/staging/comedi/drivers/dt2815.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt2815.c b/drivers/staging/comedi/drivers/dt2815.c
index 83026ba..bcf85ec 100644
--- a/drivers/staging/comedi/drivers/dt2815.c
+++ b/drivers/staging/comedi/drivers/dt2815.c
@@ -88,12 +88,11 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,
 	struct dt2815_private *devpriv = dev->private;
 	int i;
 	int chan = CR_CHAN(insn->chanspec);
-	unsigned int lo, hi;
+	unsigned int lo;
 	int ret;

 	for (i = 0; i < insn->n; i++) {
 		lo = ((data[i] & 0x0f) << 4) | (chan << 1) | 0x01;
-		hi = (data[i] & 0xff0) >> 4;

 		ret = comedi_timeout(dev, s, insn, dt2815_ao_status, 0x00);
 		if (ret)
--
2.7.4

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

  parent reply	other threads:[~2019-10-08  7:35 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
2019-10-08  7:41 ` zhengbin [this message]
2019-10-08 12:56   ` [PATCH v2 5/6] staging: comedi: Remove set but not used variable 'hi' 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=1570520515-2186-6-git-send-email-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=abbotti@mev.co.uk \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=eric@anholt.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=wahrenst@gmx.net \
    /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).