Skip to contentSkip to conversation

fs: direct-io: Remove redundant assignment to retval

PATCH New Jiapeng Chong 1 participant 1 message Apr 25, 2021 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: direct-io: Remove redundant assignment to retval

Variable retval is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed.

Cleans up the following clang-analyzer warning:

fs/direct-io.c:1245:2: warning: Value stored to 'retval' is never read [clang-analyzer-deadcode.DeadStores].

---
 fs/direct-io.c | 1 -
 1 file changed, 1 deletion(-)
fs/direct-io.c +0 -1
index b2e86e7..b348264 100644
@@ -1242,7 +1242,6 @@ static inline int drop_refcount(struct dio *dio)
 	 */
 	inode_dio_begin(inode);
 
-	retval = 0;
 	sdio.blkbits = blkbits;
 	sdio.blkfactor = i_blkbits - blkbits;
 	sdio.block_in_file = offset >> blkbits;
Signature · 1 line
1.8.3.1