From: Jonathan Cameron <jic23@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, linux-staging@lists.linux.dev,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] staging: iio: ad2s1210: remove redundant assignment to variable negative
Date: Sun, 24 Apr 2022 18:39:40 +0100 [thread overview]
Message-ID: <20220424183940.3b209ee5@jic23-huawei> (raw)
In-Reply-To: <20220418134603.81336-1-colin.i.king@gmail.com>
On Mon, 18 Apr 2022 14:46:03 +0100
Colin Ian King <colin.i.king@gmail.com> wrote:
> Variable negative is being assigned a value that is never read, it is
> being re-assigned later. The assignment is redundant and can be removed.
>
> Cleans up clang scan build warning:
> drivers/staging/iio/resolver/ad2s1210.c:502:3: warning: Value stored
> to 'negative' is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Seems that someone decided to match again against the endian converted
version so indeed this is pointless.
Applied to the togreg branch of iio.git and pushed out as testing for 0-day
to see if it can find anything we missed.
Thanks,
Jonathan
> ---
> drivers/staging/iio/resolver/ad2s1210.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
> index 74adb82f37c3..c0b2716d0511 100644
> --- a/drivers/staging/iio/resolver/ad2s1210.c
> +++ b/drivers/staging/iio/resolver/ad2s1210.c
> @@ -499,7 +499,6 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
> ret = IIO_VAL_INT;
> break;
> case IIO_ANGL_VEL:
> - negative = st->rx[0] & 0x80;
> vel = be16_to_cpup((__be16 *)st->rx);
> vel >>= 16 - st->resolution;
> if (vel & 0x8000) {
prev parent reply other threads:[~2022-04-24 17:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 13:46 Colin Ian King
2022-04-24 17:39 ` 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=20220424183940.3b209ee5@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=colin.i.king@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=llvm@lists.linux.dev \
/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®