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] [day] [month] [year] [list]
Date:   Fri, 23 Jun 2023 16:03:38 +0800
From:   Joseph Qi <joseph.qi@...ux.alibaba.com>
To:     Colin Ian King <colin.i.king@...il.com>,
        Mark Fasheh <mark@...heh.com>,
        Joel Becker <jlbec@...lplan.org>, ocfs2-devel@....oracle.com,
        akpm <akpm@...ux-foundation.org>
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] ocfs2: remove redundant assignment to variable
 bit_off



On 6/22/23 6:27 PM, Colin Ian King wrote:
> Variable bit_off is being assigned a value that is never read, it is
> being re-assigned a new value in the following while loop. Remove the
> assignment. Cleans up clang scan build warning:
> 
> fs/ocfs2/localalloc.c:976:18: warning: Although the value stored to
> 'bit_off' is used in the enclosing expression, the value is never
> actually read from 'bit_off' [deadcode.DeadStores]
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>

Reviewed-by: Joseph Qi <joseph.qi@...ux.alibaba.com>
> ---
>  fs/ocfs2/localalloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
> index c4426d12a2ad..c803c10dd97e 100644
> --- a/fs/ocfs2/localalloc.c
> +++ b/fs/ocfs2/localalloc.c
> @@ -973,7 +973,7 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
>  	la_start_blk = ocfs2_clusters_to_blocks(osb->sb,
>  						le32_to_cpu(la->la_bm_off));
>  	bitmap = la->la_bitmap;
> -	start = count = bit_off = 0;
> +	start = count = 0;
>  	left = le32_to_cpu(alloc->id1.bitmap1.i_total);
>  
>  	while ((bit_off = ocfs2_find_next_zero_bit(bitmap, left, start))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ