OCFS2-Devel Archive mirror
 help / color / mirror / Atom feed
From: Joseph Qi via Ocfs2-devel <ocfs2-devel@oss.oracle.com>
To: Colin Ian King <colin.i.king@gmail.com>,
	Mark Fasheh <mark@fasheh.com>, Joel Becker <jlbec@evilplan.org>,
	ocfs2-devel@oss.oracle.com, akpm <akpm@linux-foundation.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Ocfs2-devel] [PATCH][next] ocfs2: remove redundant assignment to variable bit_off
Date: Fri, 23 Jun 2023 16:03:38 +0800	[thread overview]
Message-ID: <6f0dfe19-426a-19cd-05f2-7184377b4862@linux.alibaba.com> (raw)
In-Reply-To: <20230622102736.2831126-1-colin.i.king@gmail.com>



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@gmail.com>

Reviewed-by: Joseph Qi <joseph.qi@linux.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))

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

           reply	other threads:[~2023-06-23  8:04 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230622102736.2831126-1-colin.i.king@gmail.com>]

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=6f0dfe19-426a-19cd-05f2-7184377b4862@linux.alibaba.com \
    --to=ocfs2-devel@oss.oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=colin.i.king@gmail.com \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).