* [PATCH] ksmbd: remove unused is_char_allowed function
@ 2023-03-24 17:30 Tom Rix
2023-03-25 1:20 ` Sergey Senozhatsky
2023-03-25 9:00 ` Namjae Jeon
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2023-03-24 17:30 UTC (permalink / raw)
To: linkinjeon, sfrench, senozhatsky, tom, nathan, ndesaulniers
Cc: linux-cifs, linux-kernel, llvm, Tom Rix
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>
---
fs/ksmbd/unicode.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/fs/ksmbd/unicode.c b/fs/ksmbd/unicode.c
index a0db699ddafd..9ae676906ed3 100644
--- a/fs/ksmbd/unicode.c
+++ b/fs/ksmbd/unicode.c
@@ -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
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ksmbd: remove unused is_char_allowed function
2023-03-24 17:30 [PATCH] ksmbd: remove unused is_char_allowed function Tom Rix
@ 2023-03-25 1:20 ` Sergey Senozhatsky
2023-03-25 9:00 ` Namjae Jeon
1 sibling, 0 replies; 3+ messages in thread
From: Sergey Senozhatsky @ 2023-03-25 1:20 UTC (permalink / raw)
To: Tom Rix
Cc: linkinjeon, sfrench, senozhatsky, tom, nathan, ndesaulniers,
linux-cifs, linux-kernel, llvm
On (23/03/24 13:30), Tom Rix wrote:
>
> 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>
We have a copy of that function in fs/ksmbd/misc.c.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ksmbd: remove unused is_char_allowed function
2023-03-24 17:30 [PATCH] ksmbd: remove unused is_char_allowed function Tom Rix
2023-03-25 1:20 ` Sergey Senozhatsky
@ 2023-03-25 9:00 ` Namjae Jeon
1 sibling, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2023-03-25 9:00 UTC (permalink / raw)
To: Tom Rix
Cc: sfrench, senozhatsky, tom, nathan, ndesaulniers, linux-cifs,
linux-kernel, llvm
2023-03-25 2:30 GMT+09:00, Tom Rix <trix@redhat.com>:
> 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>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-25 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-24 17:30 [PATCH] ksmbd: remove unused is_char_allowed function Tom Rix
2023-03-25 1:20 ` Sergey Senozhatsky
2023-03-25 9:00 ` Namjae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).