lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220115180941.709a667a@jic23-huawei>
Date:   Sat, 15 Jan 2022 18:09:41 +0000
From:   Jonathan Cameron <jic23@...nel.org>
To:     Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc:     Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        "open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>,
        Antoniu Miclaus <antoniu.miclaus@...log.com>
Subject: Re: [PATCH] iio: frequency: admv1013: remove the always true
 condition

On Wed, 5 Jan 2022 02:09:20 +0500
Muhammad Usama Anjum <usama.anjum@...labora.com> wrote:

> unsigned int variable is always greater than or equal to zero. Make the
> if condition simple.
> 
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
Hi,

+ CC Antoniu and this should have a Fixes tag.

Thanks,

Jonathan

> ---
>  drivers/iio/frequency/admv1013.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/frequency/admv1013.c b/drivers/iio/frequency/admv1013.c
> index 6cdeb50143af..3f3c478e9baa 100644
> --- a/drivers/iio/frequency/admv1013.c
> +++ b/drivers/iio/frequency/admv1013.c
> @@ -348,7 +348,7 @@ static int admv1013_update_mixer_vgate(struct admv1013_state *st)
>  
>  	vcm = regulator_get_voltage(st->reg);
>  
> -	if (vcm >= 0 && vcm < 1800000)
> +	if (vcm < 1800000)
>  		mixer_vgate = (2389 * vcm / 1000000 + 8100) / 100;
>  	else if (vcm > 1800000 && vcm < 2600000)
>  		mixer_vgate = (2375 * vcm / 1000000 + 125) / 100;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ