From: Cong Wang <amwang@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
WANG Cong <xiyou.wangcong@gmail.com>,
Akinobu Mita <akinobu.mita@gmail.com>,
Joern Engel <joern@logfs.org>,
Christoph Lameter <cl@linux-foundation.org>,
Pekka Enberg <penberg@kernel.org>
Subject: [Patch] string: do not export memweight() to userspace
Date: Mon, 6 Aug 2012 20:29:15 +0800 [thread overview]
Message-ID: <1344256158-20358-1-git-send-email-amwang@redhat.com> (raw)
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_ */
next reply other threads:[~2012-08-06 12:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 12:29 Cong Wang [this message]
2012-08-06 12:40 ` Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344256158-20358-1-git-send-email-amwang@redhat.com \
--to=amwang@redhat.com \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=joern@logfs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®