All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifs: hide unused functions
@ 2017-06-27 15:06 ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-06-27 15:06 UTC (permalink / raw)
  To: Steve French
  Cc: Shirish Pargaonkar, Pavel Shilovsky, Arnd Bergmann,
	Sachin Prabhu, Aurelien Aptel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Some functions are only referenced under an #ifdef, causing a harmless
warning:

fs/cifs/smb2ops.c:1374:1: error: 'get_smb2_acl' defined but not used [-Werror=unused-function]

We could mark them __maybe_unused or add another #ifdef, I picked
the second approach here.

Fixes: b3fdda4d1e1b ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions")
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
 fs/cifs/smb2ops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 06494e11c570..941c40b7a870 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1288,6 +1288,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
 	return rc;
 }
 
+#ifdef CONFIG_CIFS_ACL
 static struct cifs_ntsd *
 get_smb2_acl_by_fid(struct cifs_sb_info *cifs_sb,
 		const struct cifs_fid *cifsfid, u32 *pacllen)
@@ -1387,7 +1388,7 @@ get_smb2_acl(struct cifs_sb_info *cifs_sb,
 	cifsFileInfo_put(open_file);
 	return pntsd;
 }
-
+#endif
 
 static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
 			    loff_t offset, loff_t len, bool keep_size)
-- 
2.9.0

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

* [PATCH] cifs: hide unused functions
@ 2017-06-27 15:06 ` Arnd Bergmann
  0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-06-27 15:06 UTC (permalink / raw)
  To: Steve French
  Cc: Shirish Pargaonkar, Pavel Shilovsky, Arnd Bergmann,
	Sachin Prabhu, Aurelien Aptel, linux-cifs, samba-technical,
	linux-kernel

Some functions are only referenced under an #ifdef, causing a harmless
warning:

fs/cifs/smb2ops.c:1374:1: error: 'get_smb2_acl' defined but not used [-Werror=unused-function]

We could mark them __maybe_unused or add another #ifdef, I picked
the second approach here.

Fixes: b3fdda4d1e1b ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/cifs/smb2ops.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index 06494e11c570..941c40b7a870 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -1288,6 +1288,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
 	return rc;
 }
 
+#ifdef CONFIG_CIFS_ACL
 static struct cifs_ntsd *
 get_smb2_acl_by_fid(struct cifs_sb_info *cifs_sb,
 		const struct cifs_fid *cifsfid, u32 *pacllen)
@@ -1387,7 +1388,7 @@ get_smb2_acl(struct cifs_sb_info *cifs_sb,
 	cifsFileInfo_put(open_file);
 	return pntsd;
 }
-
+#endif
 
 static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
 			    loff_t offset, loff_t len, bool keep_size)
-- 
2.9.0

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

* Re: [PATCH] cifs: hide unused functions
  2017-06-27 15:06 ` Arnd Bergmann
@ 2017-06-28  5:00     ` Steve French
  -1 siblings, 0 replies; 8+ messages in thread
From: Steve French @ 2017-06-28  5:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Steve French, Shirish Pargaonkar, Pavel Shilovsky, Sachin Prabhu,
	Aurelien Aptel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	samba-technical, LKML

merged into cifs-2.6.git for-next

On Tue, Jun 27, 2017 at 10:06 AM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
> Some functions are only referenced under an #ifdef, causing a harmless
> warning:
>
> fs/cifs/smb2ops.c:1374:1: error: 'get_smb2_acl' defined but not used [-Werror=unused-function]
>
> We could mark them __maybe_unused or add another #ifdef, I picked
> the second approach here.
>
> Fixes: b3fdda4d1e1b ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions")
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
> ---
>  fs/cifs/smb2ops.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 06494e11c570..941c40b7a870 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1288,6 +1288,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
>         return rc;
>  }
>
> +#ifdef CONFIG_CIFS_ACL
>  static struct cifs_ntsd *
>  get_smb2_acl_by_fid(struct cifs_sb_info *cifs_sb,
>                 const struct cifs_fid *cifsfid, u32 *pacllen)
> @@ -1387,7 +1388,7 @@ get_smb2_acl(struct cifs_sb_info *cifs_sb,
>         cifsFileInfo_put(open_file);
>         return pntsd;
>  }
> -
> +#endif
>
>  static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
>                             loff_t offset, loff_t len, bool keep_size)
> --
> 2.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

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

* Re: [PATCH] cifs: hide unused functions
@ 2017-06-28  5:00     ` Steve French
  0 siblings, 0 replies; 8+ messages in thread
From: Steve French @ 2017-06-28  5:00 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Steve French, Shirish Pargaonkar, Pavel Shilovsky, Sachin Prabhu,
	Aurelien Aptel, linux-cifs, samba-technical, LKML

merged into cifs-2.6.git for-next

On Tue, Jun 27, 2017 at 10:06 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> Some functions are only referenced under an #ifdef, causing a harmless
> warning:
>
> fs/cifs/smb2ops.c:1374:1: error: 'get_smb2_acl' defined but not used [-Werror=unused-function]
>
> We could mark them __maybe_unused or add another #ifdef, I picked
> the second approach here.
>
> Fixes: b3fdda4d1e1b ("cifs: Use smb 2 - 3 and cifsacl mount options getacl functions")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  fs/cifs/smb2ops.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index 06494e11c570..941c40b7a870 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -1288,6 +1288,7 @@ smb2_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
>         return rc;
>  }
>
> +#ifdef CONFIG_CIFS_ACL
>  static struct cifs_ntsd *
>  get_smb2_acl_by_fid(struct cifs_sb_info *cifs_sb,
>                 const struct cifs_fid *cifsfid, u32 *pacllen)
> @@ -1387,7 +1388,7 @@ get_smb2_acl(struct cifs_sb_info *cifs_sb,
>         cifsFileInfo_put(open_file);
>         return pntsd;
>  }
> -
> +#endif
>
>  static long smb3_zero_range(struct file *file, struct cifs_tcon *tcon,
>                             loff_t offset, loff_t len, bool keep_size)
> --
> 2.9.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

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

* Re: [PATCH] cifs: hide unused functions
  2017-09-10 10:28 ` Geert Uytterhoeven
@ 2017-09-17 22:03       ` Steve French
  0 siblings, 0 replies; 8+ messages in thread
From: Steve French @ 2017-09-17 22:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Steve French, Pavel Shilovsky, Sachin Prabhu,
	Aurelien Aptel, Ronnie Sahlberg,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA, samba-technical,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

merged into cifs-2.6.git for-next

On Sun, Sep 10, 2017 at 5:28 AM, Geert Uytterhoeven
<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> wrote:
> On Tue, Sep 5, 2017 at 11:24 AM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote:
>> The newly added SMB2+ attribute support causes unused function
>> warnings when CONFIG_CIFS_XATTR is disabled:
>>
>> fs/cifs/smb2ops.c:563:1: error: 'smb2_set_ea' defined but not used [-Werror=unused-function]
>>  smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
>> fs/cifs/smb2ops.c:513:1: error: 'smb2_query_eas' defined but not used [-Werror=unused-function]
>>  smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
>>
>> This adds another #ifdef around the affected functions.
>>
>> Fixes: 5517554e4313 ("cifs: Add support for writing attributes on SMB2+")
>> Fixes: 95907fea4fd8 ("cifs: Add support for reading attributes on SMB2+")
>> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
>
> Acked-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

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

* Re: [PATCH] cifs: hide unused functions
@ 2017-09-17 22:03       ` Steve French
  0 siblings, 0 replies; 8+ messages in thread
From: Steve French @ 2017-09-17 22:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Arnd Bergmann, Steve French, Pavel Shilovsky, Sachin Prabhu,
	Aurelien Aptel, Ronnie Sahlberg, linux-cifs, samba-technical,
	linux-kernel

merged into cifs-2.6.git for-next

On Sun, Sep 10, 2017 at 5:28 AM, Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
> On Tue, Sep 5, 2017 at 11:24 AM, Arnd Bergmann <arnd@arndb.de> wrote:
>> The newly added SMB2+ attribute support causes unused function
>> warnings when CONFIG_CIFS_XATTR is disabled:
>>
>> fs/cifs/smb2ops.c:563:1: error: 'smb2_set_ea' defined but not used [-Werror=unused-function]
>>  smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
>> fs/cifs/smb2ops.c:513:1: error: 'smb2_query_eas' defined but not used [-Werror=unused-function]
>>  smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
>>
>> This adds another #ifdef around the affected functions.
>>
>> Fixes: 5517554e4313 ("cifs: Add support for writing attributes on SMB2+")
>> Fixes: 95907fea4fd8 ("cifs: Add support for reading attributes on SMB2+")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

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

* Re: [PATCH] cifs: hide unused functions
  2017-09-05  9:24 Arnd Bergmann
@ 2017-09-10 10:28 ` Geert Uytterhoeven
       [not found]   ` <CAMuHMdVjDKE4Gx_GK81SMiZ1ZttWXBVFrMpTbbeH8HFMuU_Ewg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2017-09-10 10:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Steve French, Pavel Shilovsky, Sachin Prabhu, Aurelien Aptel,
	Ronnie Sahlberg, linux-cifs, samba-technical, linux-kernel

On Tue, Sep 5, 2017 at 11:24 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> The newly added SMB2+ attribute support causes unused function
> warnings when CONFIG_CIFS_XATTR is disabled:
>
> fs/cifs/smb2ops.c:563:1: error: 'smb2_set_ea' defined but not used [-Werror=unused-function]
>  smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
> fs/cifs/smb2ops.c:513:1: error: 'smb2_query_eas' defined but not used [-Werror=unused-function]
>  smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
>
> This adds another #ifdef around the affected functions.
>
> Fixes: 5517554e4313 ("cifs: Add support for writing attributes on SMB2+")
> Fixes: 95907fea4fd8 ("cifs: Add support for reading attributes on SMB2+")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* [PATCH] cifs: hide unused functions
@ 2017-09-05  9:24 Arnd Bergmann
  2017-09-10 10:28 ` Geert Uytterhoeven
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2017-09-05  9:24 UTC (permalink / raw)
  To: Steve French
  Cc: Arnd Bergmann, Pavel Shilovsky, Sachin Prabhu, Aurelien Aptel,
	Ronnie Sahlberg, linux-cifs, samba-technical, linux-kernel

The newly added SMB2+ attribute support causes unused function
warnings when CONFIG_CIFS_XATTR is disabled:

fs/cifs/smb2ops.c:563:1: error: 'smb2_set_ea' defined but not used [-Werror=unused-function]
 smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
fs/cifs/smb2ops.c:513:1: error: 'smb2_query_eas' defined but not used [-Werror=unused-function]
 smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,

This adds another #ifdef around the affected functions.

Fixes: 5517554e4313 ("cifs: Add support for writing attributes on SMB2+")
Fixes: 95907fea4fd8 ("cifs: Add support for reading attributes on SMB2+")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/cifs/smb2ops.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index fb2934b9b97c..6cd91670ba2d 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -426,6 +426,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
 	return rc;
 }
 
+#ifdef CONFIG_CIFS_XATTR
 static ssize_t
 move_smb2_ea_to_cifs(char *dst, size_t dst_size,
 		     struct smb2_file_full_ea_info *src, size_t src_size,
@@ -613,6 +614,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
 
 	return rc;
 }
+#endif
 
 static bool
 smb2_can_echo(struct TCP_Server_Info *server)
-- 
2.9.0

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

end of thread, other threads:[~2017-09-17 22:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 15:06 [PATCH] cifs: hide unused functions Arnd Bergmann
2017-06-27 15:06 ` Arnd Bergmann
     [not found] ` <20170627152302.806239-1-arnd-r2nGTMty4D4@public.gmane.org>
2017-06-28  5:00   ` Steve French
2017-06-28  5:00     ` Steve French
2017-09-05  9:24 Arnd Bergmann
2017-09-10 10:28 ` Geert Uytterhoeven
     [not found]   ` <CAMuHMdVjDKE4Gx_GK81SMiZ1ZttWXBVFrMpTbbeH8HFMuU_Ewg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-17 22:03     ` Steve French
2017-09-17 22:03       ` Steve French

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.