aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rix2023-12-31 16:12:31 +0900
committerGreg Kroah-Hartman2024-01-05 15:18:28 +0100
commit4ef3fd2f85bb1bcaabb9fd2c5ad8d7d99d0c8e90 (patch)
tree01961bf572c064b8c171799137f88d518fbe35c5
parent226aaaa59365f22f900b58e77f3ee6f87140d6e8 (diff)
ksmbd: remove unused is_char_allowed function
[ Upstream commit 2824861773eb512b37547516d81ef78108032cb2 ] clang with W=1 reports fs/ksmbd/unicode.c:122:19: error: unused function 'is_char_allowed' [-Werror,-Wunused-function] static inline int is_char_allowed(char *ch) ^ This function is not used so remove it. Signed-off-by: Tom Rix <trix@redhat.com> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--fs/smb/server/unicode.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/fs/smb/server/unicode.c b/fs/smb/server/unicode.c
index a0db699ddafd..9ae676906ed3 100644
--- a/fs/smb/server/unicode.c
+++ b/fs/smb/server/unicode.c
@@ -114,24 +114,6 @@ cp_convert:
}
/*
- * is_char_allowed() - check for valid character
- * @ch: input character to be checked
- *
- * Return: 1 if char is allowed, otherwise 0
- */
-static inline int is_char_allowed(char *ch)
-{
- /* check for control chars, wildcards etc. */
- if (!(*ch & 0x80) &&
- (*ch <= 0x1f ||
- *ch == '?' || *ch == '"' || *ch == '<' ||
- *ch == '>' || *ch == '|'))
- return 0;
-
- return 1;
-}
-
-/*
* smb_from_utf16() - convert utf16le string to local charset
* @to: destination buffer
* @from: source buffer