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: 60740accf7 ("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>
This commit is contained in:
Wei Yongjun 2021-02-10 08:01:31 +00:00 коммит произвёл Mimi Zohar
Родитель cccb0efdef
Коммит f6692213b5
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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;