lkml.org 
[lkml]   [2012]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [Patch] string: do not export memweight() to userspace
From
2012/8/6 Cong Wang <amwang@redhat.com>:
> From: WANG Cong <xiyou.wangcong@gmail.com>
>
> This patch fixes the following warning:
>
> usr/include/linux/string.h:8: userspace cannot reference function or variable defined in the kernel

Thanks for finding this problem.
Looks good to me.

> Cc: Akinobu Mita <akinobu.mita@gmail.com>
> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
>
> ---
> diff --git a/include/linux/string.h b/include/linux/string.h
> index ffe0442..b917881 100644
> --- a/include/linux/string.h
> +++ b/include/linux/string.h
> @@ -144,8 +144,8 @@ static inline bool strstarts(const char *str, const char *prefix)
> {
> return strncmp(str, prefix, strlen(prefix)) == 0;
> }
> -#endif
>
> extern size_t memweight(const void *ptr, size_t bytes);
>
> +#endif /* __KERNEL__ */
> #endif /* _LINUX_STRING_H_ */


\
 
 \ /
  Last update: 2012-08-06 15:21    [W:0.029 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site