linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] integrity: Make function integrity_add_key() static
@ 2021-02-10  8:01 Wei Yongjun
  2021-02-10 20:52 ` Kees Cook
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wei Yongjun @ 2021-02-10  8:01 UTC (permalink / raw)
  To: Hulk Robot, James Morris, Serge E. Hallyn, Greg Kroah-Hartman,
	Mimi Zohar, Kees Cook, Scott Branden, Luis Chamberlain,
	Tushar Sugandhi
  Cc: Wei Yongjun, linux-security-module

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>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 security/integrity/digsig.c | 4 ++--
 1 file 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 @@ int __init integrity_init_keyring(const unsigned int id)
 	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;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-12 16:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-10  8:01 [PATCH -next] integrity: Make function integrity_add_key() static Wei Yongjun
2021-02-10 20:52 ` Kees Cook
2021-02-12 16:11 ` Nayna
2021-02-12 16:21 ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).