Skip to content

Commit

Permalink
cifs: remove redundant variable tcon_exist
Browse files Browse the repository at this point in the history
The variable tcon_exist is being assigned however it is never read, the
variable is redundant and can be removed.

Cleans up clang scan build warning:
warning: Although the value stored to 'tcon_exist' is used in
the enclosing expression, the value is never actually readfrom
'tcon_exist' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Colin Ian King authored and Steve French committed Jan 16, 2024
1 parent 84e9a2d commit 8ca5d26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/smb/client/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3918,7 +3918,7 @@ void smb2_reconnect_server(struct work_struct *work)
struct cifs_ses *ses, *ses2;
struct cifs_tcon *tcon, *tcon2;
struct list_head tmp_list, tmp_ses_list;
bool tcon_exist = false, ses_exist = false;
bool ses_exist = false;
bool tcon_selected = false;
int rc;
bool resched = false;
Expand Down Expand Up @@ -3964,7 +3964,7 @@ void smb2_reconnect_server(struct work_struct *work)
if (tcon->need_reconnect || tcon->need_reopen_files) {
tcon->tc_count++;
list_add_tail(&tcon->rlist, &tmp_list);
tcon_selected = tcon_exist = true;
tcon_selected = true;
}
}
/*
Expand All @@ -3973,7 +3973,7 @@ void smb2_reconnect_server(struct work_struct *work)
*/
if (ses->tcon_ipc && ses->tcon_ipc->need_reconnect) {
list_add_tail(&ses->tcon_ipc->rlist, &tmp_list);
tcon_selected = tcon_exist = true;
tcon_selected = true;
cifs_smb_ses_inc_refcount(ses);
}
/*
Expand Down

0 comments on commit 8ca5d26

Please sign in to comment.