* [PATCH] fs/cifs: Fix build warnings
@ 2014-07-14 10:38 Thierry Reding
2014-07-14 15:29 ` Steve French
0 siblings, 1 reply; 2+ messages in thread
From: Thierry Reding @ 2014-07-14 10:38 UTC (permalink / raw)
To: Steve French; +Cc: Sachin Prabhu, linux-cifs, linux-kernel
From: Thierry Reding <treding@nvidia.com>
The sess_alloc_buffer(), sess_free_buffer(), sess_establish_session()
and sess_sendreceive() functions are only used by sess_auth_lanman(),
therefore should be guarded by the same #ifdef to prevent the following
compiler warnings:
fs/cifs/sess.c:542:1: warning: 'sess_alloc_buffer' defined but not used [-Wunused-function]
sess_alloc_buffer(struct sess_data *sess_data, int wct)
^
fs/cifs/sess.c:580:1: warning: 'sess_free_buffer' defined but not used [-Wunused-function]
sess_free_buffer(struct sess_data *sess_data)
^
fs/cifs/sess.c:589:1: warning: 'sess_establish_session' defined but not used [-Wunused-function]
sess_establish_session(struct sess_data *sess_data)
^
fs/cifs/sess.c:621:1: warning: 'sess_sendreceive' defined but not used [-Wunused-function]
sess_sendreceive(struct sess_data *sess_data)
^
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
fs/cifs/sess.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index db6ecdf0974c..5fb7606b81ef 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -538,6 +538,7 @@ struct sess_data {
struct kvec iov[3];
};
+#ifdef CONFIG_CIFS_WEAK_PW_HASH
static int
sess_alloc_buffer(struct sess_data *sess_data, int wct)
{
@@ -644,7 +645,6 @@ sess_sendreceive(struct sess_data *sess_data)
* in proc/fs/cifs or via mount parm. Unfortunately this is
* needed for old Win (e.g. Win95), some obscure NAS and OS/2
*/
-#ifdef CONFIG_CIFS_WEAK_PW_HASH
static void
sess_auth_lanman(struct sess_data *sess_data)
{
--
2.0.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fs/cifs: Fix build warnings
2014-07-14 10:38 [PATCH] fs/cifs: Fix build warnings Thierry Reding
@ 2014-07-14 15:29 ` Steve French
0 siblings, 0 replies; 2+ messages in thread
From: Steve French @ 2014-07-14 15:29 UTC (permalink / raw)
To: Thierry Reding; +Cc: Steve French, Sachin Prabhu, linux-cifs, LKML
I don't see this build warning, and I do see these functions used
outside the CONFIG_CIFS_WEAK_PW_HASH - are you using current
linux-next (or equivalently cifs-2.6.git for-next branch)There were
some updates to fs/cifs late last week.
On Mon, Jul 14, 2014 at 5:38 AM, Thierry Reding
<thierry.reding@gmail.com> wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> The sess_alloc_buffer(), sess_free_buffer(), sess_establish_session()
> and sess_sendreceive() functions are only used by sess_auth_lanman(),
> therefore should be guarded by the same #ifdef to prevent the following
> compiler warnings:
>
> fs/cifs/sess.c:542:1: warning: 'sess_alloc_buffer' defined but not used [-Wunused-function]
> sess_alloc_buffer(struct sess_data *sess_data, int wct)
> ^
> fs/cifs/sess.c:580:1: warning: 'sess_free_buffer' defined but not used [-Wunused-function]
> sess_free_buffer(struct sess_data *sess_data)
> ^
> fs/cifs/sess.c:589:1: warning: 'sess_establish_session' defined but not used [-Wunused-function]
> sess_establish_session(struct sess_data *sess_data)
> ^
> fs/cifs/sess.c:621:1: warning: 'sess_sendreceive' defined but not used [-Wunused-function]
> sess_sendreceive(struct sess_data *sess_data)
> ^
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> fs/cifs/sess.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
> index db6ecdf0974c..5fb7606b81ef 100644
> --- a/fs/cifs/sess.c
> +++ b/fs/cifs/sess.c
> @@ -538,6 +538,7 @@ struct sess_data {
> struct kvec iov[3];
> };
>
> +#ifdef CONFIG_CIFS_WEAK_PW_HASH
> static int
> sess_alloc_buffer(struct sess_data *sess_data, int wct)
> {
> @@ -644,7 +645,6 @@ sess_sendreceive(struct sess_data *sess_data)
> * in proc/fs/cifs or via mount parm. Unfortunately this is
> * needed for old Win (e.g. Win95), some obscure NAS and OS/2
> */
> -#ifdef CONFIG_CIFS_WEAK_PW_HASH
> static void
> sess_auth_lanman(struct sess_data *sess_data)
> {
> --
> 2.0.1
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-14 15:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-14 10:38 [PATCH] fs/cifs: Fix build warnings Thierry Reding
2014-07-14 15:29 ` Steve French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®