All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: lars@metafoo.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: buffer: Remove redundant assignment to in_loc
Date: Mon, 17 May 2021 14:22:21 +0100	[thread overview]
Message-ID: <20210517142221.60680f3f@jic23-huawei> (raw)
In-Reply-To: <1621246317-62725-1-git-send-email-jiapeng.chong@linux.alibaba.com>

On Mon, 17 May 2021 18:11:57 +0800
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote:

> Variable in_loc is being assigned a value from a calculation
> however the assignment is never read, so this redundant assignment
> can be removed.
> 
> Clean up the following clang-analyzer warning:
> 
> drivers/iio/industrialio-buffer.c:929:3: warning: Value stored to
> 'in_loc' is never read [clang-analyzer-deadcode.DeadStores].
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to poke at it.

Thanks,

Jonathan

> ---
>  drivers/iio/industrialio-buffer.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index 10923b4..fdd6234 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -926,7 +926,6 @@ static int iio_buffer_update_demux(struct iio_dev *indio_dev,
>  		if (ret)
>  			goto error_clear_mux_table;
>  		out_loc += length;
> -		in_loc += length;
>  	}
>  	buffer->demux_bounce = kzalloc(out_loc, GFP_KERNEL);
>  	if (buffer->demux_bounce == NULL) {


      reply	other threads:[~2021-05-17 13:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 10:11 [PATCH] iio: buffer: Remove redundant assignment to in_loc Jiapeng Chong
2021-05-17 13:22 ` 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=20210517142221.60680f3f@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=lars@metafoo.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.