Skip to contentSkip to conversation

cifs: remove redundant assignment to pointer p

PATCH Applied Colin Ian King 2 participants 2 messages Dec 21, 2021 – Dec 24, 2021

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

PATCH 1/1 cifs: remove redundant assignment to pointer p

The pointer p is being assigned with a value that is never read. The pointer is being re-assigned a different value inside the do-while loop. The assignment is redundant and can be removed.

---
 fs/cifs/cifsfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/cifsfs.c +1 -1
index d3f3acf340f1..61091eed8c65 100644
@@ -775,7 +775,7 @@ cifs_get_root(struct smb3_fs_context *ctx, struct super_block *sb)
 
 	sep = CIFS_DIR_SEP(cifs_sb);
 	dentry = dget(sb->s_root);
-	p = s = full_path;
+	s = full_path;
 
 	do {
 		struct inode *dir = d_inode(dentry);
Signature · 1 line
2.32.0
Applied
#1 lore raw

merged into cifs-2.6.git for-next

Quoted 26 lines · Colin Ian King

The pointer p is being assigned with a value that is never read. The pointer is being re-assigned a different value inside the do-while loop. The assignment is redundant and can be removed.

---
 fs/cifs/cifsfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/cifsfs.c +1 -2
index d3f3acf340f1..61091eed8c65 100644
@@ -775,7 +775,7 @@ cifs_get_root(struct smb3_fs_context *ctx, struct super_block *sb)
 
        sep = CIFS_DIR_SEP(cifs_sb);
        dentry = dget(sb->s_root);
-       p = s = full_path;
+       s = full_path;
 
        do {
                struct inode *dir = d_inode(dentry);
--

2.32.0

Signature · 3 lines
Thanks,

Steve