From: Wei Yongjun <weiyongjun1@huawei.com>
To: James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>,
Casey Schaufler <casey@schaufler-ca.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
<linux-security-module@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] LSM: Make some functions static
Date: Wed, 16 Jan 2019 05:44:32 +0000 [thread overview]
Message-ID: <1547617472-60140-1-git-send-email-weiyongjun1@huawei.com> (raw)
Fixes the following sparse warnings:
security/security.c:533:5: warning:
symbol 'lsm_task_alloc' was not declared. Should it be static?
security/security.c:554:5: warning:
symbol 'lsm_ipc_alloc' was not declared. Should it be static?
security/security.c:575:5: warning:
symbol 'lsm_msg_msg_alloc' was not declared. Should it be static?
Fixes: f4ad8f2c4076 ("LSM: Infrastructure management of the task security")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
security/security.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/security/security.c b/security/security.c
index 9a98c52..750d3f3 100644
--- a/security/security.c
+++ b/security/security.c
@@ -530,7 +530,7 @@ int lsm_inode_alloc(struct inode *inode)
*
* Returns 0, or -ENOMEM if memory can't be allocated.
*/
-int lsm_task_alloc(struct task_struct *task)
+static int lsm_task_alloc(struct task_struct *task)
{
if (blob_sizes.lbs_task == 0) {
task->security = NULL;
@@ -551,7 +551,7 @@ int lsm_task_alloc(struct task_struct *task)
*
* Returns 0, or -ENOMEM if memory can't be allocated.
*/
-int lsm_ipc_alloc(struct kern_ipc_perm *kip)
+static int lsm_ipc_alloc(struct kern_ipc_perm *kip)
{
if (blob_sizes.lbs_ipc == 0) {
kip->security = NULL;
@@ -572,7 +572,7 @@ int lsm_ipc_alloc(struct kern_ipc_perm *kip)
*
* Returns 0, or -ENOMEM if memory can't be allocated.
*/
-int lsm_msg_msg_alloc(struct msg_msg *mp)
+static int lsm_msg_msg_alloc(struct msg_msg *mp)
{
if (blob_sizes.lbs_msg_msg == 0) {
mp->security = NULL;
next reply other threads:[~2019-01-16 5:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 5:44 Wei Yongjun [this message]
2019-01-18 19:40 ` [PATCH -next] LSM: Make some functions static James Morris
2019-01-18 19:44 ` Casey Schaufler
2019-01-18 19:47 ` James Morris
-- strict thread matches above, loose matches on Subject: below --
2019-01-16 5:33 YueHaibing
2019-01-16 5:45 ` YueHaibing
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=1547617472-60140-1-git-send-email-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.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;
as well as URLs for NNTP newsgroup(s).