public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] cifs: remove dead code
@ 2014-09-08 15:20 Arnd Bergmann
  2014-09-16 18:45 ` Steve French
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2014-09-08 15:20 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 07fe97ac6b0c..ab0fda6e8e58 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -745,14 +745,6 @@ out:
 	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
@@ -1103,15 +1095,6 @@ out:
 	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 */
 
 /*

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] cifs: remove dead code
  2014-09-08 15:20 [PATCH] cifs: remove dead code Arnd Bergmann
@ 2014-09-16 18:45 ` Steve French
  0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2014-09-16 18:45 UTC (permalink / raw)
  To: linux-arm-kernel

Merged into cifs-2.6.git for-next

Added Yalin Wang <yalin.wang@sonymobile.com> who reported the same problem/fix

On Mon, Sep 8, 2014 at 10:20 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
> index 07fe97ac6b0c..ab0fda6e8e58 100644
> --- a/fs/cifs/sess.c
> +++ b/fs/cifs/sess.c
> @@ -745,14 +745,6 @@ out:
>         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
> @@ -1103,15 +1095,6 @@ out:
>         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 */
>
>  /*
>



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-16 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-08 15:20 [PATCH] cifs: remove dead code Arnd Bergmann
2014-09-16 18:45 ` Steve French

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox