[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <364f1d1b-c32f-3066-6e8e-686c7acc7ac9@codeaurora.org>
Date: Sat, 6 Apr 2019 13:50:50 +0530
From: Mukesh Ojha <mojha@...eaurora.org>
To: YueHaibing <yuehaibing@...wei.com>, Ian Abbott <abbotti@....co.uk>,
H Hartley Sweeten <hsweeten@...ionengravers.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sanjana Sanikommu <sanjana99reddy99@...il.com>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH -next] staging: comedi: dyna_pci10xx: remove set but not
used variables 'chan' and range'
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@...wei.com>
Reviewed-by: Mukesh Ojha <mojha@...eaurora.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++) {
>
>
>
>
>
Powered by blists - more mailing lists