]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
LSM: Make some functions static
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 16 Jan 2019 05:44:32 +0000 (05:44 +0000)
committerJames Morris <james.morris@microsoft.com>
Fri, 18 Jan 2019 19:46:44 +0000 (11:46 -0800)
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>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <james.morris@microsoft.com>
security/security.c

index 992b612c819a5e0d42985c1b6a73e18b1b620686..3664fb9d5cf715d0bc5d1695af290750c5bc6963 100644 (file)
@@ -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;