From: Jonathan Cameron <jic23@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] iio: st_accel: remove redundant unsigned less than zero check
Date: Sun, 03 Mar 2019 16:16:10 +0000 [thread overview]
Message-ID: <20190303161610.43a03ffa@archlinux> (raw)
In-Reply-To: <20190221104636.1922-1-colin.king@canonical.com>
On Thu, 21 Feb 2019 10:46:36 +0000
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The check that variable val is less than zero is redundant since val
> is an unsigned int and hence can never be less than zero. Remove it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/accel/st_accel_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
> index a3c0916479fa..9930edf423bf 100644
> --- a/drivers/iio/accel/st_accel_core.c
> +++ b/drivers/iio/accel/st_accel_core.c
> @@ -992,7 +992,7 @@ static int apply_acpi_orientation(struct iio_dev *indio_dev,
> goto out;
>
> val = elements[i].integer.value;
> - if (val < 0 || val > 2)
> + if (val > 2)
> goto out;
>
> /* Avoiding full matrix multiplication, we simply reorder the
WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: Colin King <colin.king@canonical.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] iio: st_accel: remove redundant unsigned less than zero check
Date: Sun, 3 Mar 2019 16:16:10 +0000 [thread overview]
Message-ID: <20190303161610.43a03ffa@archlinux> (raw)
In-Reply-To: <20190221104636.1922-1-colin.king@canonical.com>
On Thu, 21 Feb 2019 10:46:36 +0000
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The check that variable val is less than zero is redundant since val
> is an unsigned int and hence can never be less than zero. Remove it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/accel/st_accel_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
> index a3c0916479fa..9930edf423bf 100644
> --- a/drivers/iio/accel/st_accel_core.c
> +++ b/drivers/iio/accel/st_accel_core.c
> @@ -992,7 +992,7 @@ static int apply_acpi_orientation(struct iio_dev *indio_dev,
> goto out;
>
> val = elements[i].integer.value;
> - if (val < 0 || val > 2)
> + if (val > 2)
> goto out;
>
> /* Avoiding full matrix multiplication, we simply reorder the
next prev parent reply other threads:[~2019-03-03 16:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 10:46 [PATCH][next] iio: st_accel: remove redundant unsigned less than zero check Colin King
2019-03-03 16:16 ` Jonathan Cameron [this message]
2019-03-03 16:16 ` Jonathan Cameron
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=20190303161610.43a03ffa@archlinux \
--to=jic23@kernel.org \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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.