ksmbd: remove unused is_char_allowed function
Subsystems (2)
PATCH 1/1 ksmbd: remove unused is_char_allowed function
clang with W=1 reportsfs/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.
--- fs/ksmbd/unicode.c | 18 ------------------ 1 file changed, 18 deletions(-)
fs/ksmbd/unicode.c +0 -18
@@ -113,24 +113,6 @@ cifs_mapchar(char *target, const __u16 src_char, const struct nls_table *cp, 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
Signature · 1 line
2.27.0
Quoted 9 lines · Tom Rix
clang with W=1 reports
fs/ksmbd/unicode.c:122:19: error: unused function
'is_char_allowed' [-Werror,-Wunused-function]
static inline intis_char_allowed(char *ch)^This function is not used so remove it.
Signed-off-by Tom Rix <[email protected]>
We have a copy of that function in fs/ksmbd/misc.c.
2023-03-25 2:30 GMT+09:00, Tom Rix <[email protected]>:
Quoted 8 lines
clang with W=1 reports
fs/ksmbd/unicode.c:122:19: error: unused function
'is_char_allowed' [-Werror,-Wunused-function]
static inline intis_char_allowed(char *ch)^This function is not used so remove it.
Signed-off-by Tom Rix <[email protected]>
Thanks!