Skip to contentSkip to conversation

f2fs: remove redundant initialization of pointer 'p'

PATCH In review Colin King 2 participants 2 messages Feb 21, 2018 – Feb 25, 2018

Subsystems (2)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 f2fs: remove redundant initialization of pointer 'p'

From: Colin Ian King <[email protected]>

Pointer p is initialized with a value that is never read and is later re-assigned a new value, hence the initialization is redundant and can be removed.

Cleans up clang warning:
fs/f2fs/extent_cache.c:463:19: warning: Value stored to 'p' during its initialization is never read

---
 fs/f2fs/extent_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/extent_cache.c +1 -1
index ff2352a0ed15..956b2744386b 100644
@@ -460,7 +460,7 @@ static struct extent_node *__insert_extent_tree(struct inode *inode,
 				struct rb_node *insert_parent)
 {
 	struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
-	struct rb_node **p = &et->root.rb_node;
+	struct rb_node **p;
 	struct rb_node *parent = NULL;
 	struct extent_node *en = NULL;
 
Signature · 1 line
2.15.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Colin King

From: Colin Ian King <[email protected]>

Pointer p is initialized with a value that is never read and is later re-assigned a new value, hence the initialization is redundant and can be removed.

Cleans up clang warning:
fs/f2fs/extent_cache.c:463:19: warning: Value stored to 'p' during its initialization is never read

Thanks,