Skip to contentSkip to conversation

fs/ntfs3: remove redundant assignment to variable frame

PATCH Applied Colin Ian King 2 participants 2 messages Dec 30, 2021 – Jun 7, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/ntfs3: remove redundant assignment to variable frame

Variable frame is assigned a value that is never read. The assignment is redundant and can be removed. Cleans up the clang-scan build warning:

fs/ntfs3/file.c:995:3: warning: Value stored to 'frame' is never read [deadcode.DeadStores]

                frame = pos >> frame_bits;
---
 fs/ntfs3/file.c | 1 -
 1 file changed, 1 deletion(-)
fs/ntfs3/file.c +0 -1
index 3bae76930e68..27c32692513c 100644
@@ -992,7 +992,6 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from)
 		if (bytes > count)
 			bytes = count;
 
-		frame = pos >> frame_bits;
 		frame_vbo = pos & ~(frame_size - 1);
 		index = frame_vbo >> PAGE_SHIFT;
 
Signature · 1 line
2.33.1
maintainer Applied
#1 lore raw
Quoted 18 lines · Colin Ian King

Variable frame is assigned a value that is never read. The assignment is redundant and can be removed. Cleans up the clang-scan build warning:

fs/ntfs3/file.c:995:3: warning: Value stored to 'frame' is never read [deadcode.DeadStores]

                 frame = pos >> frame_bits;
---
  fs/ntfs3/file.c | 1 -
  1 file changed, 1 deletion(-)
fs/ntfs3/file.c +0 -0
index 3bae76930e68..27c32692513c 100644

fs/ntfs3/file.c static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from) · line 997

Quoted 7 lines
fs/ntfs3/file.c +0 -1
@@ -992,7 +992,6 @@ static ssize_t ntfs_compress_write(struct kiocb *iocb, struct iov_iter *from)
  		if (bytes > count)
  			bytes = count;
 
-		frame = pos >> frame_bits;
  		frame_vbo = pos & ~(frame_size - 1);
  		index = frame_vbo >> PAGE_SHIFT;
 

Applied, thanks!