Skip to contentSkip to conversation

cifs: hide unused functions

PATCH Applied Arnd Bergmann 3 participants 3 messages Sep 5, 2017 – Sep 17, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: hide unused functions

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+")
---
 fs/cifs/smb2ops.c | 2 ++
 1 file changed, 2 insertions(+)
fs/cifs/smb2ops.c +2 -0
index fb2934b9b97c..6cd91670ba2d 100644
@@ -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)
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Arnd Bergmann

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,

Quoted 5 lines

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+")

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

Applied
#2 lore raw

merged into cifs-2.6.git for-next

Quoted 31 lines · Geert Uytterhoeven
Quoted 8 lines · Arnd Bergmann

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,

Quoted 5 lines

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+")

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Thanks,

Steve