Skip to contentSkip to conversation

pNFS/NFSv4: Remove redundant initialization of 'rd_size'

PATCH New Yang Li 1 participant 1 message May 12, 2021

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 pNFS/NFSv4: Remove redundant initialization of 'rd_size'

Variable 'rd_size' is being initialized however this value is never read as 'rd_size' is assigned a new value in for statement. Remove the redundant assignment.

Clean up clang warning:

fs/nfs/pnfs.c:2681:6: warning: Value stored to 'rd_size' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

---
 fs/nfs/pnfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/pnfs.c +1 -1
index 03e0b34..f076a6f 100644
@@ -2678,7 +2678,7 @@ void pnfs_error_mark_layout_for_return(struct inode *inode,
 void
 pnfs_generic_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *req)
 {
-	u64 rd_size = req->wb_bytes;
+	u64 rd_size;
 
 	pnfs_generic_pg_check_layout(pgio);
 	pnfs_generic_pg_check_range(pgio, req);
Signature · 1 line
1.8.3.1