Skip to contentSkip to conversation

smb: client: remove redundant pointer 'server'

PATCH Applied Colin Ian King 2 participants 2 messages Jun 30, 2023 – Jul 1, 2023

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

PATCH 1/1 smb: client: remove redundant pointer 'server'

The pointer 'server' is assigned but never read, the pointer is redundant and can be removed. Cleans up clang scan build warning:

fs/smb/client/dfs.c:217:3: warning: Value stored to 'server' is never read [deadcode.DeadStores]

---
 fs/smb/client/dfs.c | 2 --
 1 file changed, 2 deletions(-)
fs/smb/client/dfs.c +0 -2
index 26d14dd0482e..1403a2d1ab17 100644
@@ -143,7 +143,6 @@ static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
 	struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
 	char *ref_path = NULL, *full_path = NULL;
 	struct dfs_cache_tgt_iterator *tit;
-	struct TCP_Server_Info *server;
 	struct cifs_tcon *tcon;
 	char *origin_fullpath = NULL;
 	char sep = CIFS_DIR_SEP(cifs_sb);
@@ -214,7 +213,6 @@ static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
 	} while (rc == -EREMOTE);
 
 	if (!rc) {
-		server = mnt_ctx->server;
 		tcon = mnt_ctx->tcon;
 
 		spin_lock(&tcon->tc_lock);
Signature · 1 line
2.39.2
Applied
#1 lore raw

merged into cifs-2.6.git for-next

Quoted 35 lines · Colin Ian King

The pointer 'server' is assigned but never read, the pointer is redundant and can be removed. Cleans up clang scan build warning:

fs/smb/client/dfs.c:217:3: warning: Value stored to 'server' is never read [deadcode.DeadStores]

---
 fs/smb/client/dfs.c | 2 --
 1 file changed, 2 deletions(-)
fs/smb/client/dfs.c +0 -3
index 26d14dd0482e..1403a2d1ab17 100644
@@ -143,7 +143,6 @@ static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
        struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
        char *ref_path = NULL, *full_path = NULL;
        struct dfs_cache_tgt_iterator *tit;
-       struct TCP_Server_Info *server;
        struct cifs_tcon *tcon;
        char *origin_fullpath = NULL;
        char sep = CIFS_DIR_SEP(cifs_sb);
@@ -214,7 +213,6 @@ static int __dfs_mount_share(struct cifs_mount_ctx *mnt_ctx)
        } while (rc == -EREMOTE);
 
        if (!rc) {
-               server = mnt_ctx->server;
                tcon = mnt_ctx->tcon;
 
                spin_lock(&tcon->tc_lock);
--

2.39.2

Signature · 3 lines
Thanks,

Steve