[PATCH] ima: make ima_mok_init() static

Jason Yan yanaijie at huawei.com
Fri Apr 3 06:21:58 UTC 2020


Fix the following sparse warning:

security/integrity/ima/ima_mok.c:24:12: warning: symbol 'ima_mok_init'
was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci at huawei.com>
Signed-off-by: Jason Yan <yanaijie at huawei.com>
---
 security/integrity/ima/ima_mok.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/integrity/ima/ima_mok.c b/security/integrity/ima/ima_mok.c
index 36cadadbfba4..a93a2ca257d9 100644
--- a/security/integrity/ima/ima_mok.c
+++ b/security/integrity/ima/ima_mok.c
@@ -21,7 +21,7 @@ struct key *ima_blacklist_keyring;
 /*
  * Allocate the IMA blacklist keyring
  */
-__init int ima_mok_init(void)
+static __init int ima_mok_init(void)
 {
 	struct key_restriction *restriction;
 
-- 
2.17.2



More information about the Linux-security-module-archive mailing list