Skip to content

Commit 2824861

Browse files
Tom Rixsmfrench
authored andcommitted
ksmbd: remove unused is_char_allowed function
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 <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Acked-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent e416ea6 commit 2824861

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

fs/ksmbd/unicode.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,6 @@ cifs_mapchar(char *target, const __u16 src_char, const struct nls_table *cp,
113113
goto out;
114114
}
115115

116-
/*
117-
* is_char_allowed() - check for valid character
118-
* @ch: input character to be checked
119-
*
120-
* Return: 1 if char is allowed, otherwise 0
121-
*/
122-
static inline int is_char_allowed(char *ch)
123-
{
124-
/* check for control chars, wildcards etc. */
125-
if (!(*ch & 0x80) &&
126-
(*ch <= 0x1f ||
127-
*ch == '?' || *ch == '"' || *ch == '<' ||
128-
*ch == '>' || *ch == '|'))
129-
return 0;
130-
131-
return 1;
132-
}
133-
134116
/*
135117
* smb_from_utf16() - convert utf16le string to local charset
136118
* @to: destination buffer

0 commit comments

Comments
 (0)