Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: cpcap-adc: remove redundant assignment to variable cal_data_diff
Date: Mon, 7 Feb 2022 20:40:59 +0000	[thread overview]
Message-ID: <20220207204059.67f0f1e8@jic23-huawei> (raw)
In-Reply-To: <20220207135943.340629-1-colin.i.king@gmail.com>

On Mon,  7 Feb 2022 13:59:43 +0000
Colin Ian King <colin.i.king@gmail.com> wrote:

> The variable cal_data_diff is being assigned a value that is never read,
> it is being re-assigned later on with a new value in both paths of an
> if statement. The assignment is redundant, so remove it.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/cpcap-adc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c
> index 40e59f4c95bc..b6c4ef70484e 100644
> --- a/drivers/iio/adc/cpcap-adc.c
> +++ b/drivers/iio/adc/cpcap-adc.c
> @@ -474,7 +474,7 @@ static int cpcap_adc_calibrate_one(struct cpcap_adc *ddata,
>  	for (i = 0; i < CPCAP_ADC_MAX_RETRIES; i++) {
>  		calibration_data[0]  = 0;
>  		calibration_data[1]  = 0;
> -		cal_data_diff = 0;
> +
>  		cpcap_adc_setup_calibrate(ddata, channel);
>  		error = regmap_read(ddata->reg, calibration_register,
>  				    &calibration_data[0]);


      reply	other threads:[~2022-02-07 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 13:59 [PATCH] iio: adc: cpcap-adc: remove redundant assignment to variable cal_data_diff Colin Ian King
2022-02-07 20:40 ` Jonathan Cameron [this message]

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=20220207204059.67f0f1e8@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=colin.i.king@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-iio@vger.kernel.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