Skip to contentSkip to conversation

xfs: remove redundant assignment to variable bit

PATCH In review Colin King 2 participants 2 messages Oct 31, 2017

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 xfs: remove redundant assignment to variable bit

From: Colin Ian King <[email protected]>

Variable bit is being assigned a value that is never read, hence the assignment is redundant and can be removed. Cleans up clang warning:

fs/xfs/libxfs/xfs_rtbitmap.c:675:3: warning: Value stored to 'bit' is never read

---
 fs/xfs/libxfs/xfs_rtbitmap.c | 1 -
 1 file changed, 1 deletion(-)
fs/xfs/libxfs/xfs_rtbitmap.c +0 -1
index 5d4e43ef4eea..ac09c4333485 100644
@@ -672,7 +672,6 @@ xfs_rtmodify_range(
 		/*
 		 * Compute a mask of relevant bits.
 		 */
-		bit = 0;
 		mask = ((xfs_rtword_t)1 << lastbit) - 1;
 		/*
 		 * Set/clear the active bits.
Signature · 1 line
2.14.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Colin King

From: Colin Ian King <[email protected]>

Variable bit is being assigned a value that is never read, hence the assignment is redundant and can be removed. Cleans up clang warning:

fs/xfs/libxfs/xfs_rtbitmap.c:675:3: warning: Value stored to 'bit' is never read

Looks ok,

Quoted 23 lines
---
 fs/xfs/libxfs/xfs_rtbitmap.c | 1 -
 1 file changed, 1 deletion(-)
fs/xfs/libxfs/xfs_rtbitmap.c +0 -1
index 5d4e43ef4eea..ac09c4333485 100644
@@ -672,7 +672,6 @@ xfs_rtmodify_range(
 		/*
 		 * Compute a mask of relevant bits.
 		 */
-		bit = 0;
 		mask = ((xfs_rtword_t)1 << lastbit) - 1;
 		/*
 		 * Set/clear the active bits.
Signature · 6 lines
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html