Re: [PATCH 4/9] Remove unused string_escape_*_any_np
From: Kees Cook
Date: Thu Sep 05 2019 - 17:32:55 EST
On Thu, Sep 05, 2019 at 03:44:28PM -0400, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields@xxxxxxxxxx>
>
> These aren't called anywhere.
Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>
-Kees
>
> Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>
> ---
> include/linux/string_helpers.h | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
> index c28955132234..8a299a29b767 100644
> --- a/include/linux/string_helpers.h
> +++ b/include/linux/string_helpers.h
> @@ -56,25 +56,12 @@ int string_escape_mem(const char *src, size_t isz, char *dst, size_t osz,
>
> int string_escape_mem_ascii(const char *src, size_t isz, char *dst,
> size_t osz);
> -
> -static inline int string_escape_mem_any_np(const char *src, size_t isz,
> - char *dst, size_t osz, const char *only)
> -{
> - return string_escape_mem(src, isz, dst, osz, ESCAPE_ANY_NP, only);
> -}
> -
> static inline int string_escape_str(const char *src, char *dst, size_t sz,
> unsigned int flags, const char *only)
> {
> return string_escape_mem(src, strlen(src), dst, sz, flags, only);
> }
>
> -static inline int string_escape_str_any_np(const char *src, char *dst,
> - size_t sz, const char *only)
> -{
> - return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, only);
> -}
> -
> char *kstrdup_quotable(const char *src, gfp_t gfp);
> char *kstrdup_quotable_cmdline(struct task_struct *task, gfp_t gfp);
> char *kstrdup_quotable_file(struct file *file, gfp_t gfp);
> --
> 2.21.0
>
--
Kees Cook