Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1726580 > unrolled thread

[PATCH] cifs: hide unused functions

Started byArnd Bergmann <arnd@arndb.de>
First post2017-09-05 11:30 +0200
Last post2017-09-10 12:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] cifs: hide unused functions Arnd Bergmann <arnd@arndb.de> - 2017-09-05 11:30 +0200
    Re: [PATCH] cifs: hide unused functions Geert Uytterhoeven <geert@linux-m68k.org> - 2017-09-10 12:30 +0200

#1726580 — [PATCH] cifs: hide unused functions

FromArnd Bergmann <arnd@arndb.de>
Date2017-09-05 11:30 +0200
Subject[PATCH] cifs: hide unused functions
Message-ID<umilb-S9-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1729950

FromGeert Uytterhoeven <geert@linux-m68k.org>
Date2017-09-10 12:30 +0200
Message-ID<uo7EZ-2kK-3@gated-at.bofh.it>
In reply to#1726580
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web