Skip to content

Commit

Permalink
cifs: remove dead code
Browse files Browse the repository at this point in the history
cifs provides two dummy functions 'sess_auth_lanman' and
'sess_auth_kerberos' for the case in which the respective
features are not defined. However, the caller is also under
an #ifdef, so we just get warnings about unused code:

fs/cifs/sess.c:1109:1: warning: 'sess_auth_kerberos' defined but not used [-Wunused-function]
 sess_auth_kerberos(struct sess_data *sess_data)

Removing the dead functions gets rid of the warnings without
any downsides that I can see.

(Yalin Wang reported the identical problem and fix so added him)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
Signed-off-by: Steve French <smfrench@gmail.com>
  • Loading branch information
Arnd Bergmann authored and Steve French committed Sep 16, 2014
1 parent a5c3e1c commit 116ae5e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions fs/cifs/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -745,14 +745,6 @@ sess_auth_lanman(struct sess_data *sess_data)
sess_free_buffer(sess_data);
}

#else

static void
sess_auth_lanman(struct sess_data *sess_data)
{
sess_data->result = -EOPNOTSUPP;
sess_data->func = NULL;
}
#endif

static void
Expand Down Expand Up @@ -1103,15 +1095,6 @@ sess_auth_kerberos(struct sess_data *sess_data)
ses->auth_key.response = NULL;
}

#else

static void
sess_auth_kerberos(struct sess_data *sess_data)
{
cifs_dbg(VFS, "Kerberos negotiated but upcall support disabled!\n");
sess_data->result = -ENOSYS;
sess_data->func = NULL;
}
#endif /* ! CONFIG_CIFS_UPCALL */

/*
Expand Down

0 comments on commit 116ae5e

Please sign in to comment.