mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [Patch] string: do not export memweight() to userspace
@ 2012-08-06 12:29 Cong Wang
  2012-08-06 12:40 ` Akinobu Mita
  0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2012-08-06 12:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, WANG Cong, Akinobu Mita, Joern Engel,
	Christoph Lameter, Pekka Enberg

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

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_ */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-06 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 12:29 [Patch] string: do not export memweight() to userspace Cong Wang
2012-08-06 12:40 ` Akinobu Mita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®