diff options
author | Arvind Sankar <[email protected]> | 2020-06-15 14:30:37 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-06-18 12:20:38 -0700 |
commit | 65c7cc49bfcf49d38fc84552a17d7e8a3268e58e (patch) | |
tree | 4740b896f8b5fc114ae9a96c6581776799ffeb3a /module/icp | |
parent | 1fa5c7af3314b4c556bd86e3a49e3497a5ed72ed (diff) |
Mark functions as static
Mark functions used only in the same translation unit as static. This
only includes functions that do not have a prototype in a header file
either.
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Arvind Sankar <[email protected]>
Closes #10470
Diffstat (limited to 'module/icp')
-rw-r--r-- | module/icp/algs/modes/ccm.c | 14 | ||||
-rw-r--r-- | module/icp/algs/modes/gcm.c | 9 | ||||
-rw-r--r-- | module/icp/core/kcf_sched.c | 4 |
3 files changed, 13 insertions, 14 deletions
diff --git a/module/icp/algs/modes/ccm.c b/module/icp/algs/modes/ccm.c index ad603a32a..c927f0897 100644 --- a/module/icp/algs/modes/ccm.c +++ b/module/icp/algs/modes/ccm.c @@ -318,7 +318,7 @@ ccm_encrypt_final(ccm_ctx_t *ctx, crypto_data_t *out, size_t block_size, * This will only deal with decrypting the last block of the input that * might not be a multiple of block length. */ -void +static void ccm_decrypt_incomplete_block(ccm_ctx_t *ctx, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *)) { @@ -573,7 +573,7 @@ ccm_decrypt_final(ccm_ctx_t *ctx, crypto_data_t *out, size_t block_size, return (CRYPTO_SUCCESS); } -int +static int ccm_validate_args(CK_AES_CCM_PARAMS *ccm_param, boolean_t is_encrypt_init) { size_t macSize, nonceSize; @@ -758,11 +758,7 @@ encode_adata_len(ulong_t auth_data_len, uint8_t *encoded, size_t *encoded_len) } } -/* - * The following function should be call at encrypt or decrypt init time - * for AES CCM mode. - */ -int +static int ccm_init(ccm_ctx_t *ctx, unsigned char *nonce, size_t nonce_len, unsigned char *auth_data, size_t auth_data_len, size_t block_size, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), @@ -846,6 +842,10 @@ ccm_init(ccm_ctx_t *ctx, unsigned char *nonce, size_t nonce_len, return (CRYPTO_SUCCESS); } +/* + * The following function should be call at encrypt or decrypt init time + * for AES CCM mode. + */ int ccm_init_ctx(ccm_ctx_t *ccm_ctx, char *param, int kmflag, boolean_t is_encrypt_init, size_t block_size, diff --git a/module/icp/algs/modes/gcm.c b/module/icp/algs/modes/gcm.c index 6b732808a..5553c55e1 100644 --- a/module/icp/algs/modes/gcm.c +++ b/module/icp/algs/modes/gcm.c @@ -518,11 +518,7 @@ gcm_format_initial_blocks(uchar_t *iv, ulong_t iv_len, } } -/* - * The following function is called at encrypt or decrypt init time - * for AES GCM mode. - */ -int +static int gcm_init(gcm_ctx_t *ctx, unsigned char *iv, size_t iv_len, unsigned char *auth_data, size_t auth_data_len, size_t block_size, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), @@ -574,6 +570,9 @@ gcm_init(gcm_ctx_t *ctx, unsigned char *iv, size_t iv_len, } /* + * The following function is called at encrypt or decrypt init time + * for AES GCM mode. + * * Init the GCM context struct. Handle the cycle and avx implementations here. */ int diff --git a/module/icp/core/kcf_sched.c b/module/icp/core/kcf_sched.c index c8c2bbd42..40d50553d 100644 --- a/module/icp/core/kcf_sched.c +++ b/module/icp/core/kcf_sched.c @@ -872,7 +872,7 @@ kcf_free_req(kcf_areq_node_t *areq) * Utility routine to remove a request from the chain of requests * hanging off a context. */ -void +static void kcf_removereq_in_ctxchain(kcf_context_t *ictx, kcf_areq_node_t *areq) { kcf_areq_node_t *cur, *prev; @@ -909,7 +909,7 @@ kcf_removereq_in_ctxchain(kcf_context_t *ictx, kcf_areq_node_t *areq) * * The caller must hold the queue lock and request lock (an_lock). */ -void +static void kcf_remove_node(kcf_areq_node_t *node) { kcf_areq_node_t *nextp = node->an_next; |