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: <20200420045412.236974C04A@d06av22.portsmouth.uk.ibm.com>
Date:   Mon, 20 Apr 2020 10:24:10 +0530
From:   Ritesh Harjani <riteshh@...ux.ibm.com>
To:     Jason Yan <yanaijie@...wei.com>, tytso@....edu,
        adilger.kernel@...ger.ca, enwlinux@...il.com,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ext4: remove unnecessary comparisons to bool



On 4/20/20 9:59 AM, Jason Yan wrote:
> Fix the following coccicheck warning:
> 
> fs/ext4/extents_status.c:1057:5-28: WARNING: Comparison to bool
> fs/ext4/inode.c:2314:18-24: WARNING: Comparison to bool
> 
> Signed-off-by: Jason Yan <yanaijie@...wei.com>

Thanks for the patch. Looks good to me.

Feel free to add:
Reviewed-by: Ritesh Harjani <riteshh@...ux.ibm.com>

> ---
>   fs/ext4/extents_status.c | 2 +-
>   fs/ext4/inode.c          | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
> index d996b44d2265..e75171535375 100644
> --- a/fs/ext4/extents_status.c
> +++ b/fs/ext4/extents_status.c
> @@ -1054,7 +1054,7 @@ static void count_rsvd(struct inode *inode, ext4_lblk_t lblk, long len,
>   	end = (end > ext4_es_end(es)) ? ext4_es_end(es) : end;
> 
>   	/* record the first block of the first delonly extent seen */
> -	if (rc->first_do_lblk_found == false) {
> +	if (!rc->first_do_lblk_found) {
>   		rc->first_do_lblk = i;
>   		rc->first_do_lblk_found = true;
>   	}
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 2a4aae6acdcb..acb8fedcba76 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2311,7 +2311,7 @@ static int mpage_map_and_submit_buffers(struct mpage_da_data *mpd)
>   			 * mapping, or maybe the page was submitted for IO.
>   			 * So we return to call further extent mapping.
>   			 */
> -			if (err < 0 || map_bh == true)
> +			if (err < 0 || map_bh)
>   				goto out;
>   			/* Page fully mapped - let IO run! */
>   			err = mpage_submit_page(mpd, page);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ