From: Wei Yongjun Date: Wed, 10 Feb 2021 08:01:31 +0000 (+0000) Subject: integrity: Make function integrity_add_key() static X-Git-Tag: block-5.12-2021-02-27~25^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f6692213b5045dc461ce0858fb18cf46f328c202;p=linux-2.6-block.git 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 Fixes: 60740accf784 ("integrity: Load certs to the platform keyring") Signed-off-by: Wei Yongjun Reviewed-by: Kees Cook Reviewed-by: Nayna Jain Signed-off-by: Mimi Zohar --- 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;