Thread (90 messages) 90 messages, 6 authors, 2021-11-04
STALE1729d REVIEWED: 2 (1M)

[PATCH 45/61] xfs: Remove redundant assignment to busy

From: "Darrick J. Wong" <djwong@kernel.org>
Date: 2021-09-15 23:10:42
Subsystem: the rest · Maintainer: Linus Torvalds

From: Jiapeng Chong <redacted>

Source kernel commit: 9673261c32dc2f30863b803374b726a72d16b07c

Variable busy is set to false, but this value is never read as it is
overwritten or not used later on, hence it is a redundant assignment
and can be removed.

Clean up the following clang-analyzer warning:

fs/xfs/libxfs/xfs_alloc.c:1679:2: warning: Value stored to 'busy' is
never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <redacted>
Signed-off-by: Jiapeng Chong <redacted>
Reviewed-by: Brian Foster <redacted>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 libxfs/xfs_alloc.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c
index 369bb0ba..5f455342 100644
--- a/libxfs/xfs_alloc.c
+++ b/libxfs/xfs_alloc.c
@@ -1672,7 +1672,6 @@ xfs_alloc_ag_vextent_size(
 	cnt_cur = xfs_allocbt_init_cursor(args->mp, args->tp, args->agbp,
 					args->pag, XFS_BTNUM_CNT);
 	bno_cur = NULL;
-	busy = false;
 
 	/*
 	 * Look for an entry >= maxlen+alignment-1 blocks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help