summaryrefslogtreecommitdiffstats
path: root/security/integrity
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2021-02-10 08:01:31 +0000
committerMimi Zohar <zohar@linux.ibm.com>2021-02-12 11:11:59 -0500
commitf6692213b5045dc461ce0858fb18cf46f328c202 (patch)
treea141a793c6aa0947f1903f4b216e992abc366289 /security/integrity
parentcccb0efdef01e8a9f44ac38e081c485f92fac3a4 (diff)
downloadlinux-stable-f6692213b5045dc461ce0858fb18cf46f328c202.tar.gz
linux-stable-f6692213b5045dc461ce0858fb18cf46f328c202.tar.bz2
linux-stable-f6692213b5045dc461ce0858fb18cf46f328c202.zip
integrity: Make function integrity_add_key() static
The sparse tool complains as follows: security/integrity/digsig.c:146:12: warning: symbol 'integrity_add_key' was not declared. Should it be static? This function is not used outside of digsig.c, so this commit marks it static. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 60740accf784 ("integrity: Load certs to the platform keyring") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Nayna Jain <nayna@linux.ibm.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security/integrity')
-rw-r--r--security/integrity/digsig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
index 0f518dcfde05..250fb0836156 100644
--- a/security/integrity/digsig.c
+++ b/security/integrity/digsig.c
@@ -143,8 +143,8 @@ out:
return __integrity_init_keyring(id, perm, restriction);
}
-int __init integrity_add_key(const unsigned int id, const void *data,
- off_t size, key_perm_t perm)
+static int __init integrity_add_key(const unsigned int id, const void *data,
+ off_t size, key_perm_t perm)
{
key_ref_t key;
int rc = 0;