ksmbd: remove unused is_char_allowed function
authorTom Rix <trix@redhat.com>
Fri, 24 Mar 2023 17:30:56 +0000 (13:30 -0400)
committerSteve French <stfrench@microsoft.com>
Sat, 25 Mar 2023 19:54:06 +0000 (14:54 -0500)
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>
fs/ksmbd/unicode.c

index a0db699ddafda5a51700cd1b30635a6dd5adf4a1..9ae676906ed394409eb4ba84a4d9a9113e73aea9 100644 (file)
@@ -113,24 +113,6 @@ cp_convert:
        goto out;
 }
 
-/*
- * 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