Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1675896 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-06-27 17:30 +0200 |
| Last post | 2017-06-28 07:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] cifs: hide unused functions Arnd Bergmann <arnd@arndb.de> - 2017-06-27 17:30 +0200
Re: [PATCH] cifs: hide unused functions Steve French <smfrench@gmail.com> - 2017-06-28 07:10 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-06-27 17:30 +0200 |
| Subject | [PATCH] cifs: hide unused functions |
| Message-ID | <tX0Bc-2nz-35@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Steve French <smfrench@gmail.com> |
|---|---|
| Date | 2017-06-28 07:10 +0200 |
| Message-ID | <tXdoJ-2xT-1@gated-at.bofh.it> |
| In reply to | #1675896 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web