mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: YueHaibing <yuehaibing@huawei.com>,
	Ian Abbott <abbotti@mev.co.uk>,
	H Hartley Sweeten <hsweeten@visionengravers.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sanjana Sanikommu <sanjana99reddy99@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] staging: comedi: dyna_pci10xx: remove set but not used variables 'chan' and range'
Date: Sat, 6 Apr 2019 13:50:50 +0530	[thread overview]
Message-ID: <364f1d1b-c32f-3066-6e8e-686c7acc7ac9@codeaurora.org> (raw)
In-Reply-To: <20190406030749.56659-1-yuehaibing@huawei.com>


On 4/6/2019 8:37 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/staging/comedi/drivers/dyna_pci10xx.c: In function 'dyna_pci10xx_insn_write_ao':
> drivers/staging/comedi/drivers/dyna_pci10xx.c:109:21: warning:
>   variable 'range' set but not used [-Wunused-but-set-variable]
>    unsigned int chan, range;
>
> drivers/staging/comedi/drivers/dyna_pci10xx.c:109:15: warning:
>   variable 'chan' set but not used [-Wunused-but-set-variable]
>    unsigned int chan, range;
>
> They are never used since introduction in commit 16a7373a8e14 ("Staging:
> comedi: add dyna_pci10xx driver")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh

> ---
>   drivers/staging/comedi/drivers/dyna_pci10xx.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c
> index 9bdd5bf2eb99..d38bfc6113e8 100644
> --- a/drivers/staging/comedi/drivers/dyna_pci10xx.c
> +++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c
> @@ -106,10 +106,6 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev,
>   {
>   	struct dyna_pci10xx_private *devpriv = dev->private;
>   	int n;
> -	unsigned int chan, range;
> -
> -	chan = CR_CHAN(insn->chanspec);
> -	range = range_codes_pci1050_ai[CR_RANGE((insn->chanspec))];
>   
>   	mutex_lock(&devpriv->mutex);
>   	for (n = 0; n < insn->n; n++) {
>
>
>
>
>

  reply	other threads:[~2019-04-06  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-06  3:07 YueHaibing
2019-04-06  8:20 ` Mukesh Ojha [this message]
2019-04-06 10:13 ` 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=364f1d1b-c32f-3066-6e8e-686c7acc7ac9@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanjana99reddy99@gmail.com \
    --cc=yuehaibing@huawei.com \
    /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

all inboxes | Powered by JetHome®