Thread (4 messages) 4 messages, 4 authors, 2021-02-12

Re: [PATCH -next] integrity: Make function integrity_add_key() static

flat view

From: Nayna <hidden>
Date: 2021-02-12 16:12:12

On 2/10/21 3:01 AM, Wei Yongjun wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
Signed-off-by: Wei Yongjun <redacted>
---
  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;
Reviewed-by: Nayna Jain <nayna@linux.ibm.com>


Thanks & Regards,
    - Nayna
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help