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: <BN6PR03MB3347A202426BE1F409B3A68599CD0@BN6PR03MB3347.namprd03.prod.outlook.com>
Date:   Sat, 28 Mar 2020 09:43:58 +0000
From:   "Sa, Nuno" <Nuno.Sa@...log.com>
To:     Rohit Sarkar <rohitsarkar5398@...il.com>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>
CC:     "jic23@...nel.org" <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Bogdan, Dragos" <Dragos.Bogdan@...log.com>
Subject: RE: [PATCH] iio: temperature: ltc2983: remove redundant comparison to
 bool



> -----Original Message-----
> From: Rohit Sarkar <rohitsarkar5398@...il.com>
> Sent: Samstag, 28. März 2020 07:53
> To: linux-iio@...r.kernel.org
> Cc: Sa, Nuno <Nuno.Sa@...log.com>; rohitsarkar5398@...il.com;
> jic23@...nel.org; Hartmut Knaack <knaack.h@....de>; Lars-Peter Clausen
> <lars@...afoo.de>; Peter Meerwald-Stadler <pmeerw@...erw.net>; linux-
> iio@...r.kernel.org; linux-kernel@...r.kernel.org; Bogdan, Dragos
> <Dragos.Bogdan@...log.com>
> Subject: [PATCH] iio: temperature: ltc2983: remove redundant comparison to
> bool
> 
> 
> Remove redundant comparison to a boolean variable.
> 
> Fixes coccinelle warning:
> drivers/iio/temperature//ltc2983.c:393:20-32: WARNING: Comparison to
> bool
> drivers/iio/temperature//ltc2983.c:394:20-32: WARNING: Comparison to
> bool
> 
> Signed-off-by: Rohit Sarkar <rohitsarkar5398@...il.com>
> ---
>  drivers/iio/temperature/ltc2983.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/temperature/ltc2983.c
> b/drivers/iio/temperature/ltc2983.c
> index d39c0d6b77f1..8976e8d59826 100644
> --- a/drivers/iio/temperature/ltc2983.c
> +++ b/drivers/iio/temperature/ltc2983.c
> @@ -390,8 +390,8 @@ static struct ltc2983_custom_sensor
> *__ltc2983_custom_sensor_new(
>  	 * For custom steinhart, the full u32 is taken. For all the others
>  	 * the MSB is discarded.
>  	 */
> -	const u8 n_size = (is_steinhart == true) ? 4 : 3;
> -	const u8 e_size = (is_steinhart == true) ? sizeof(u32) : sizeof(u64);
> +	const u8 n_size = is_steinhart ? 4 : 3;
> +	const u8 e_size = is_steinhart ? sizeof(u32) : sizeof(u64);
> 
>  	n_entries = of_property_count_elems_of_size(np, propname, e_size);
>  	/* n_entries must be an even number */
> --

Acked-by: Nuno Sá <nuno.sa@...log.com>

Thanks,
Nuno Sá

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ