Skip to content

Commit

Permalink
string: do not export memweight() to userspace
Browse files Browse the repository at this point in the history
Fix the following warning:

  usr/include/linux/string.h:8: userspace cannot reference function or variable defined in the kernel

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
WANG Cong authored and Linus Torvalds committed Aug 21, 2012
1 parent d46f3d8 commit c3a5ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */

0 comments on commit c3a5ce0

Please sign in to comment.