From 18e4f67960a7ad4f7300bd868f24c8a9f90472b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sun, 12 Dec 2021 17:34:25 +0100 Subject: [PATCH] module: icp: fix unused, remove argsused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia ZiemiaƄska Closes #12844 --- module/icp/algs/aes/aes_impl.c | 1 - module/icp/algs/modes/cbc.c | 2 -- module/icp/algs/modes/ccm.c | 3 +-- module/icp/algs/modes/ctr.c | 1 - module/icp/algs/modes/ecb.c | 1 - module/icp/algs/modes/gcm.c | 5 ++-- module/icp/asm-x86_64/aes/aes_aesni.S | 8 +++--- module/icp/asm-x86_64/aes/aes_amd64.S | 4 +-- module/icp/asm-x86_64/modes/gcm_pclmulqdq.S | 2 +- module/icp/asm-x86_64/sha1/sha1-x86_64.S | 2 +- module/icp/asm-x86_64/sha2/sha256_impl.S | 2 +- module/icp/asm-x86_64/sha2/sha512_impl.S | 2 +- module/icp/core/kcf_mech_tabs.c | 4 +-- module/icp/core/kcf_prov_lib.c | 1 + module/icp/core/kcf_sched.c | 12 ++++----- module/icp/io/aes.c | 14 +++++------ module/icp/io/sha1_mod.c | 20 +++++++-------- module/icp/io/sha2_mod.c | 20 +++++++-------- module/icp/io/skein_mod.c | 27 ++++++++++----------- module/icp/os/modconf.c | 2 ++ module/icp/os/modhash.c | 8 +++--- 21 files changed, 69 insertions(+), 72 deletions(-) diff --git a/module/icp/algs/aes/aes_impl.c b/module/icp/algs/aes/aes_impl.c index 037be0db6..a5b88b8aa 100644 --- a/module/icp/algs/aes/aes_impl.c +++ b/module/icp/algs/aes/aes_impl.c @@ -206,7 +206,6 @@ aes_decrypt_block(const void *ks, const uint8_t *ct, uint8_t *pt) * size Size of key schedule allocated, in bytes * kmflag Flag passed to kmem_alloc(9F); ignored in userland. */ -/* ARGSUSED */ void * aes_alloc_keysched(size_t *size, int kmflag) { diff --git a/module/icp/algs/modes/cbc.c b/module/icp/algs/modes/cbc.c index 85864f56d..bddb5b64d 100644 --- a/module/icp/algs/modes/cbc.c +++ b/module/icp/algs/modes/cbc.c @@ -137,7 +137,6 @@ out: #define OTHER(a, ctx) \ (((a) == (ctx)->cbc_lastblock) ? (ctx)->cbc_iv : (ctx)->cbc_lastblock) -/* ARGSUSED */ int cbc_decrypt_contiguous_blocks(cbc_ctx_t *ctx, char *data, size_t length, crypto_data_t *out, size_t block_size, @@ -259,7 +258,6 @@ cbc_init_ctx(cbc_ctx_t *cbc_ctx, char *param, size_t param_len, return (CRYPTO_SUCCESS); } -/* ARGSUSED */ void * cbc_alloc_ctx(int kmflag) { diff --git a/module/icp/algs/modes/ccm.c b/module/icp/algs/modes/ccm.c index 5d6507c49..a41cbc395 100644 --- a/module/icp/algs/modes/ccm.c +++ b/module/icp/algs/modes/ccm.c @@ -190,7 +190,6 @@ calculate_ccm_mac(ccm_ctx_t *ctx, uint8_t *ccm_mac, } } -/* ARGSUSED */ int ccm_encrypt_final(ccm_ctx_t *ctx, crypto_data_t *out, size_t block_size, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), @@ -342,7 +341,6 @@ ccm_decrypt_incomplete_block(ccm_ctx_t *ctx, * returned to the caller. It will be returned when decrypt_final() is * called if the MAC matches */ -/* ARGSUSED */ int ccm_mode_decrypt_contiguous_blocks(ccm_ctx_t *ctx, char *data, size_t length, crypto_data_t *out, size_t block_size, @@ -350,6 +348,7 @@ ccm_mode_decrypt_contiguous_blocks(ccm_ctx_t *ctx, char *data, size_t length, void (*copy_block)(uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)) { + (void) out; size_t remainder = length; size_t need = 0; uint8_t *datap = (uint8_t *)data; diff --git a/module/icp/algs/modes/ctr.c b/module/icp/algs/modes/ctr.c index 0188bdd39..82295cda8 100644 --- a/module/icp/algs/modes/ctr.c +++ b/module/icp/algs/modes/ctr.c @@ -214,7 +214,6 @@ ctr_init_ctx(ctr_ctx_t *ctr_ctx, ulong_t count, uint8_t *cb, return (CRYPTO_SUCCESS); } -/* ARGSUSED */ void * ctr_alloc_ctx(int kmflag) { diff --git a/module/icp/algs/modes/ecb.c b/module/icp/algs/modes/ecb.c index 025f5825c..ffbdb9d57 100644 --- a/module/icp/algs/modes/ecb.c +++ b/module/icp/algs/modes/ecb.c @@ -114,7 +114,6 @@ out: return (CRYPTO_SUCCESS); } -/* ARGSUSED */ void * ecb_alloc_ctx(int kmflag) { diff --git a/module/icp/algs/modes/gcm.c b/module/icp/algs/modes/gcm.c index 7332834cb..3a1660d93 100644 --- a/module/icp/algs/modes/gcm.c +++ b/module/icp/algs/modes/gcm.c @@ -199,13 +199,13 @@ out: return (CRYPTO_SUCCESS); } -/* ARGSUSED */ int gcm_encrypt_final(gcm_ctx_t *ctx, crypto_data_t *out, size_t block_size, int (*encrypt_block)(const void *, const uint8_t *, uint8_t *), void (*copy_block)(uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)) { + (void) copy_block; #ifdef CAN_USE_GCM_ASM if (ctx->gcm_use_avx == B_TRUE) return (gcm_encrypt_final_avx(ctx, out, block_size)); @@ -324,7 +324,6 @@ gcm_decrypt_incomplete_block(gcm_ctx_t *ctx, size_t block_size, size_t index, } } -/* ARGSUSED */ int gcm_mode_decrypt_contiguous_blocks(gcm_ctx_t *ctx, char *data, size_t length, crypto_data_t *out, size_t block_size, @@ -332,6 +331,8 @@ gcm_mode_decrypt_contiguous_blocks(gcm_ctx_t *ctx, char *data, size_t length, void (*copy_block)(uint8_t *, uint8_t *), void (*xor_block)(uint8_t *, uint8_t *)) { + (void) out, (void) block_size, (void) encrypt_block, (void) copy_block, + (void) xor_block; size_t new_len; uint8_t *new; diff --git a/module/icp/asm-x86_64/aes/aes_aesni.S b/module/icp/asm-x86_64/aes/aes_aesni.S index 4a80c6209..1a8669ccd 100644 --- a/module/icp/asm-x86_64/aes/aes_aesni.S +++ b/module/icp/asm-x86_64/aes/aes_aesni.S @@ -154,26 +154,26 @@ #include -/* ARGSUSED */ void aes_encrypt_intel(const uint32_t rk[], int Nr, const uint32_t pt[4], uint32_t ct[4]) { + (void) rk, (void) Nr, (void) pt, (void) ct; } -/* ARGSUSED */ void aes_decrypt_intel(const uint32_t rk[], int Nr, const uint32_t ct[4], uint32_t pt[4]) { + (void) rk, (void) Nr, (void) ct, (void) pt; } -/* ARGSUSED */ int rijndael_key_setup_enc_intel(uint32_t rk[], const uint32_t cipherKey[], uint64_t keyBits) { + (void) rk, (void) cipherKey, (void) keyBits; return (0); } -/* ARGSUSED */ int rijndael_key_setup_dec_intel(uint32_t rk[], const uint32_t cipherKey[], uint64_t keyBits) { + (void) rk, (void) cipherKey, (void) keyBits; return (0); } diff --git a/module/icp/asm-x86_64/aes/aes_amd64.S b/module/icp/asm-x86_64/aes/aes_amd64.S index 9db3a3179..272720e51 100644 --- a/module/icp/asm-x86_64/aes/aes_amd64.S +++ b/module/icp/asm-x86_64/aes/aes_amd64.S @@ -186,15 +186,15 @@ #if defined(lint) || defined(__lint) #include -/* ARGSUSED */ void aes_encrypt_amd64(const uint32_t rk[], int Nr, const uint32_t pt[4], uint32_t ct[4]) { + (void) rk, (void) Nr, (void) pt, (void) ct; } -/* ARGSUSED */ void aes_decrypt_amd64(const uint32_t rk[], int Nr, const uint32_t ct[4], uint32_t pt[4]) { + (void) rk, (void) Nr, (void) pt, (void) ct; } diff --git a/module/icp/asm-x86_64/modes/gcm_pclmulqdq.S b/module/icp/asm-x86_64/modes/gcm_pclmulqdq.S index 59edc4c8d..0e1e04b78 100644 --- a/module/icp/asm-x86_64/modes/gcm_pclmulqdq.S +++ b/module/icp/asm-x86_64/modes/gcm_pclmulqdq.S @@ -85,9 +85,9 @@ #include -/* ARGSUSED */ void gcm_mul_pclmulqdq(uint64_t *x_in, uint64_t *y, uint64_t *res) { + (void) x_in, (void) y, (void) res; } #elif defined(HAVE_PCLMULQDQ) /* guard by instruction set */ diff --git a/module/icp/asm-x86_64/sha1/sha1-x86_64.S b/module/icp/asm-x86_64/sha1/sha1-x86_64.S index fc844cd8c..1d65e818d 100644 --- a/module/icp/asm-x86_64/sha1/sha1-x86_64.S +++ b/module/icp/asm-x86_64/sha1/sha1-x86_64.S @@ -59,10 +59,10 @@ #include -/* ARGSUSED */ void sha1_block_data_order(SHA1_CTX *ctx, const void *inpp, size_t blocks) { + (void) ctx, (void) inpp, (void) blocks; } #else diff --git a/module/icp/asm-x86_64/sha2/sha256_impl.S b/module/icp/asm-x86_64/sha2/sha256_impl.S index 28b048d2d..ccd4a3e6b 100644 --- a/module/icp/asm-x86_64/sha2/sha256_impl.S +++ b/module/icp/asm-x86_64/sha2/sha256_impl.S @@ -71,10 +71,10 @@ #include #include -/* ARGSUSED */ void SHA256TransformBlocks(SHA2_CTX *ctx, const void *in, size_t num) { + (void) ctx, (void) in, (void) num; } diff --git a/module/icp/asm-x86_64/sha2/sha512_impl.S b/module/icp/asm-x86_64/sha2/sha512_impl.S index 746c85a98..c6e7efd86 100644 --- a/module/icp/asm-x86_64/sha2/sha512_impl.S +++ b/module/icp/asm-x86_64/sha2/sha512_impl.S @@ -72,10 +72,10 @@ #include #include -/* ARGSUSED */ void SHA512TransformBlocks(SHA2_CTX *ctx, const void *in, size_t num) { + (void) ctx, (void) in, (void) num; } diff --git a/module/icp/core/kcf_mech_tabs.c b/module/icp/core/kcf_mech_tabs.c index 2642b317d..e1ac7ffd5 100644 --- a/module/icp/core/kcf_mech_tabs.c +++ b/module/icp/core/kcf_mech_tabs.c @@ -786,6 +786,6 @@ kcf_get_mech_entry(crypto_mech_type_t mech_type, kcf_mech_entry_t **mep) crypto_mech_type_t crypto_mech2id_common(char *mechname, boolean_t load_module) { - crypto_mech_type_t mt = kcf_mech_hash_find(mechname); - return (mt); + (void) load_module; + return (kcf_mech_hash_find(mechname)); } diff --git a/module/icp/core/kcf_prov_lib.c b/module/icp/core/kcf_prov_lib.c index 1b115d976..6e8853c56 100644 --- a/module/icp/core/kcf_prov_lib.c +++ b/module/icp/core/kcf_prov_lib.c @@ -40,6 +40,7 @@ int crypto_uio_data(crypto_data_t *data, uchar_t *buf, int len, cmd_type_t cmd, void *digest_ctx, void (*update)(void)) { + (void) digest_ctx, (void) update; zfs_uio_t *uiop = data->cd_uio; off_t offset = data->cd_offset; size_t length = len; diff --git a/module/icp/core/kcf_sched.c b/module/icp/core/kcf_sched.c index 81fd15f8e..e4ccdbde9 100644 --- a/module/icp/core/kcf_sched.c +++ b/module/icp/core/kcf_sched.c @@ -970,10 +970,10 @@ kcf_enqueue(kcf_areq_node_t *node) /* * kmem_cache_alloc constructor for sync request structure. */ -/* ARGSUSED */ static int kcf_sreq_cache_constructor(void *buf, void *cdrarg, int kmflags) { + (void) cdrarg, (void) kmflags; kcf_sreq_node_t *sreq = (kcf_sreq_node_t *)buf; sreq->sn_type = CRYPTO_SYNCH; @@ -983,10 +983,10 @@ kcf_sreq_cache_constructor(void *buf, void *cdrarg, int kmflags) return (0); } -/* ARGSUSED */ static void kcf_sreq_cache_destructor(void *buf, void *cdrarg) { + (void) cdrarg; kcf_sreq_node_t *sreq = (kcf_sreq_node_t *)buf; mutex_destroy(&sreq->sn_lock); @@ -996,10 +996,10 @@ kcf_sreq_cache_destructor(void *buf, void *cdrarg) /* * kmem_cache_alloc constructor for async request structure. */ -/* ARGSUSED */ static int kcf_areq_cache_constructor(void *buf, void *cdrarg, int kmflags) { + (void) cdrarg, (void) kmflags; kcf_areq_node_t *areq = (kcf_areq_node_t *)buf; areq->an_type = CRYPTO_ASYNCH; @@ -1011,10 +1011,10 @@ kcf_areq_cache_constructor(void *buf, void *cdrarg, int kmflags) return (0); } -/* ARGSUSED */ static void kcf_areq_cache_destructor(void *buf, void *cdrarg) { + (void) cdrarg; kcf_areq_node_t *areq = (kcf_areq_node_t *)buf; ASSERT(areq->an_refcnt == 0); @@ -1026,10 +1026,10 @@ kcf_areq_cache_destructor(void *buf, void *cdrarg) /* * kmem_cache_alloc constructor for kcf_context structure. */ -/* ARGSUSED */ static int kcf_context_cache_constructor(void *buf, void *cdrarg, int kmflags) { + (void) cdrarg, (void) kmflags; kcf_context_t *kctx = (kcf_context_t *)buf; kctx->kc_refcnt = 0; @@ -1038,10 +1038,10 @@ kcf_context_cache_constructor(void *buf, void *cdrarg, int kmflags) return (0); } -/* ARGSUSED */ static void kcf_context_cache_destructor(void *buf, void *cdrarg) { + (void) cdrarg; kcf_context_t *kctx = (kcf_context_t *)buf; ASSERT(kctx->kc_refcnt == 0); diff --git a/module/icp/io/aes.c b/module/icp/io/aes.c index c47c7567b..d50e3bdc1 100644 --- a/module/icp/io/aes.c +++ b/module/icp/io/aes.c @@ -311,10 +311,10 @@ init_keysched(crypto_key_t *key, void *newbie) /* * KCF software provider control entry points. */ -/* ARGSUSED */ static void aes_provider_status(crypto_provider_handle_t provider, uint_t *status) { + (void) provider; *status = CRYPTO_PROVIDER_READY; } @@ -617,11 +617,11 @@ cleanup: } -/* ARGSUSED */ static int aes_encrypt_update(crypto_ctx_t *ctx, crypto_data_t *plaintext, crypto_data_t *ciphertext, crypto_req_handle_t req) { + (void) req; off_t saved_offset; size_t saved_length, out_len; int ret = CRYPTO_SUCCESS; @@ -769,11 +769,11 @@ aes_decrypt_update(crypto_ctx_t *ctx, crypto_data_t *ciphertext, return (ret); } -/* ARGSUSED */ static int aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { + (void) req; aes_ctx_t *aes_ctx; int ret; @@ -826,11 +826,11 @@ aes_encrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, return (CRYPTO_SUCCESS); } -/* ARGSUSED */ static int aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { + (void) req; aes_ctx_t *aes_ctx; int ret; off_t saved_offset; @@ -929,13 +929,13 @@ aes_decrypt_final(crypto_ctx_t *ctx, crypto_data_t *data, return (CRYPTO_SUCCESS); } -/* ARGSUSED */ static int aes_encrypt_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *plaintext, crypto_data_t *ciphertext, crypto_spi_ctx_template_t template, crypto_req_handle_t req) { + (void) provider, (void) session_id; aes_ctx_t aes_ctx; /* on the stack */ off_t saved_offset; size_t saved_length; @@ -1065,13 +1065,13 @@ out: return (ret); } -/* ARGSUSED */ static int aes_decrypt_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *ciphertext, crypto_data_t *plaintext, crypto_spi_ctx_template_t template, crypto_req_handle_t req) { + (void) provider, (void) session_id; aes_ctx_t aes_ctx; /* on the stack */ off_t saved_offset; size_t saved_length; @@ -1235,12 +1235,12 @@ out: /* * KCF software provider context template entry points. */ -/* ARGSUSED */ static int aes_create_ctx_template(crypto_provider_handle_t provider, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_spi_ctx_template_t *tmpl, size_t *tmpl_size, crypto_req_handle_t req) { + (void) provider; void *keysched; size_t size; int rv; diff --git a/module/icp/io/sha1_mod.c b/module/icp/io/sha1_mod.c index 6dcee6b2e..5a372e3d3 100644 --- a/module/icp/io/sha1_mod.c +++ b/module/icp/io/sha1_mod.c @@ -227,10 +227,10 @@ sha1_mod_fini(void) /* * KCF software provider control entry points. */ -/* ARGSUSED */ static void sha1_provider_status(crypto_provider_handle_t provider, uint_t *status) { + (void) provider, (void) status; *status = CRYPTO_PROVIDER_READY; } @@ -409,11 +409,11 @@ sha1_digest_final_uio(SHA1_CTX *sha1_ctx, crypto_data_t *digest, return (CRYPTO_SUCCESS); } -/* ARGSUSED */ static int sha1_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; ASSERT(ctx->cc_provider_private != NULL); @@ -483,11 +483,11 @@ sha1_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest, return (ret); } -/* ARGSUSED */ static int sha1_digest_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; ASSERT(ctx->cc_provider_private != NULL); @@ -512,11 +512,11 @@ sha1_digest_update(crypto_ctx_t *ctx, crypto_data_t *data, return (ret); } -/* ARGSUSED */ static int sha1_digest_final(crypto_ctx_t *ctx, crypto_data_t *digest, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; ASSERT(ctx->cc_provider_private != NULL); @@ -561,13 +561,13 @@ sha1_digest_final(crypto_ctx_t *ctx, crypto_data_t *digest, return (ret); } -/* ARGSUSED */ static int sha1_digest_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_data_t *data, crypto_data_t *digest, crypto_req_handle_t req) { + (void) provider, (void) session_id, (void) req; int ret = CRYPTO_SUCCESS; SHA1_CTX sha1_ctx; @@ -754,10 +754,10 @@ sha1_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, return (ret); } -/* ARGSUSED */ static int sha1_mac_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; ASSERT(ctx->cc_provider_private != NULL); @@ -783,10 +783,10 @@ sha1_mac_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) return (ret); } -/* ARGSUSED */ static int sha1_mac_final(crypto_ctx_t *ctx, crypto_data_t *mac, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; uchar_t digest[SHA1_DIGEST_LENGTH]; uint32_t digest_len = SHA1_DIGEST_LENGTH; @@ -877,13 +877,13 @@ sha1_mac_final(crypto_ctx_t *ctx, crypto_data_t *mac, crypto_req_handle_t req) } \ } -/* ARGSUSED */ static int sha1_mac_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, crypto_spi_ctx_template_t ctx_template, crypto_req_handle_t req) { + (void) provider, (void) session_id, (void) req; int ret = CRYPTO_SUCCESS; uchar_t digest[SHA1_DIGEST_LENGTH]; sha1_hmac_ctx_t sha1_hmac_ctx; @@ -993,13 +993,13 @@ bail: return (ret); } -/* ARGSUSED */ static int sha1_mac_verify_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, crypto_spi_ctx_template_t ctx_template, crypto_req_handle_t req) { + (void) provider, (void) session_id, (void) req; int ret = CRYPTO_SUCCESS; uchar_t digest[SHA1_DIGEST_LENGTH]; sha1_hmac_ctx_t sha1_hmac_ctx; @@ -1147,13 +1147,13 @@ bail: * KCF software provider context management entry points. */ -/* ARGSUSED */ static int sha1_create_ctx_template(crypto_provider_handle_t provider, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_spi_ctx_template_t *ctx_template, size_t *ctx_template_size, crypto_req_handle_t req) { + (void) provider; sha1_hmac_ctx_t *sha1_hmac_ctx_tmpl; uint_t keylen_in_bytes = CRYPTO_BITS2BYTES(key->ck_length); diff --git a/module/icp/io/sha2_mod.c b/module/icp/io/sha2_mod.c index d690cd0bc..77957ee11 100644 --- a/module/icp/io/sha2_mod.c +++ b/module/icp/io/sha2_mod.c @@ -254,10 +254,10 @@ sha2_mod_fini(void) /* * KCF software provider control entry points. */ -/* ARGSUSED */ static void sha2_provider_status(crypto_provider_handle_t provider, uint_t *status) { + (void) provider; *status = CRYPTO_PROVIDER_READY; } @@ -438,11 +438,11 @@ sha2_digest_final_uio(SHA2_CTX *sha2_ctx, crypto_data_t *digest, return (CRYPTO_SUCCESS); } -/* ARGSUSED */ static int sha2_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; uint_t sha_digest_len; @@ -526,11 +526,11 @@ sha2_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest, return (ret); } -/* ARGSUSED */ static int sha2_digest_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; ASSERT(ctx->cc_provider_private != NULL); @@ -555,11 +555,11 @@ sha2_digest_update(crypto_ctx_t *ctx, crypto_data_t *data, return (ret); } -/* ARGSUSED */ static int sha2_digest_final(crypto_ctx_t *ctx, crypto_data_t *digest, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; uint_t sha_digest_len; @@ -618,13 +618,13 @@ sha2_digest_final(crypto_ctx_t *ctx, crypto_data_t *digest, return (ret); } -/* ARGSUSED */ static int sha2_digest_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_data_t *data, crypto_data_t *digest, crypto_req_handle_t req) { + (void) provider, (void) session_id, (void) req; int ret = CRYPTO_SUCCESS; SHA2_CTX sha2_ctx; uint32_t sha_digest_len; @@ -840,11 +840,11 @@ sha2_mac_init(crypto_ctx_t *ctx, crypto_mechanism_t *mechanism, return (ret); } -/* ARGSUSED */ static int sha2_mac_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; ASSERT(ctx->cc_provider_private != NULL); @@ -870,10 +870,10 @@ sha2_mac_update(crypto_ctx_t *ctx, crypto_data_t *data, return (ret); } -/* ARGSUSED */ static int sha2_mac_final(crypto_ctx_t *ctx, crypto_data_t *mac, crypto_req_handle_t req) { + (void) req; int ret = CRYPTO_SUCCESS; uchar_t digest[SHA512_DIGEST_LENGTH]; uint32_t digest_len, sha_digest_len; @@ -983,13 +983,13 @@ sha2_mac_final(crypto_ctx_t *ctx, crypto_data_t *mac, crypto_req_handle_t req) } \ } -/* ARGSUSED */ static int sha2_mac_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, crypto_spi_ctx_template_t ctx_template, crypto_req_handle_t req) { + (void) provider, (void) session_id, (void) req; int ret = CRYPTO_SUCCESS; uchar_t digest[SHA512_DIGEST_LENGTH]; sha2_hmac_ctx_t sha2_hmac_ctx; @@ -1121,13 +1121,13 @@ bail: return (ret); } -/* ARGSUSED */ static int sha2_mac_verify_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_data_t *data, crypto_data_t *mac, crypto_spi_ctx_template_t ctx_template, crypto_req_handle_t req) { + (void) provider, (void) session_id, (void) req; int ret = CRYPTO_SUCCESS; uchar_t digest[SHA512_DIGEST_LENGTH]; sha2_hmac_ctx_t sha2_hmac_ctx; @@ -1301,13 +1301,13 @@ bail: * KCF software provider context management entry points. */ -/* ARGSUSED */ static int sha2_create_ctx_template(crypto_provider_handle_t provider, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_spi_ctx_template_t *ctx_template, size_t *ctx_template_size, crypto_req_handle_t req) { + (void) provider; sha2_hmac_ctx_t *sha2_hmac_ctx_tmpl; uint_t keylen_in_bytes = CRYPTO_BITS2BYTES(key->ck_length); uint32_t sha_digest_len, sha_hmac_block_size; diff --git a/module/icp/io/skein_mod.c b/module/icp/io/skein_mod.c index ac7d201eb..49dcbadd8 100644 --- a/module/icp/io/skein_mod.c +++ b/module/icp/io/skein_mod.c @@ -250,10 +250,10 @@ skein_mod_fini(void) /* * KCF software provider control entry points. */ -/* ARGSUSED */ static void skein_provider_status(crypto_provider_handle_t provider, uint_t *status) { + (void) provider; *status = CRYPTO_PROVIDER_READY; } @@ -462,10 +462,10 @@ skein_digest(crypto_ctx_t *ctx, crypto_data_t *data, crypto_data_t *digest, * can push more data). This is used both for digest and MAC operation. * Supported input data formats are raw, uio and mblk. */ -/*ARGSUSED*/ static int skein_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) { + (void) req; int error = CRYPTO_SUCCESS; ASSERT(SKEIN_CTX(ctx) != NULL); @@ -491,7 +491,6 @@ skein_update(crypto_ctx_t *ctx, crypto_data_t *data, crypto_req_handle_t req) * for digest and MAC operation. * Supported output digest formats are raw, uio and mblk. */ -/*ARGSUSED*/ static int skein_final(crypto_ctx_t *ctx, crypto_data_t *digest, crypto_req_handle_t req) { @@ -537,15 +536,15 @@ skein_final(crypto_ctx_t *ctx, crypto_data_t *digest, crypto_req_handle_t req) * `data' and writing the output to `digest'. * Supported input/output formats are raw, uio and mblk. */ -/*ARGSUSED*/ static int skein_digest_atomic(crypto_provider_handle_t provider, crypto_session_id_t session_id, crypto_mechanism_t *mechanism, crypto_data_t *data, crypto_data_t *digest, crypto_req_handle_t req) { - int error; - skein_ctx_t skein_ctx; - crypto_ctx_t ctx; + (void) provider, (void) session_id, (void) req; + int error; + skein_ctx_t skein_ctx; + crypto_ctx_t ctx; SKEIN_CTX_LVALUE(&ctx) = &skein_ctx; /* Init */ @@ -640,7 +639,6 @@ errout: * The MAC update and final calls are reused from the regular digest code. */ -/*ARGSUSED*/ /* * Same as skein_digest_atomic, performs an atomic Skein MAC operation in * one step. All the same properties apply to the arguments of this @@ -653,9 +651,10 @@ skein_mac_atomic(crypto_provider_handle_t provider, crypto_spi_ctx_template_t ctx_template, crypto_req_handle_t req) { /* faux crypto context just for skein_digest_{update,final} */ - int error; - crypto_ctx_t ctx; - skein_ctx_t skein_ctx; + (void) provider, (void) session_id; + int error; + crypto_ctx_t ctx; + skein_ctx_t skein_ctx; SKEIN_CTX_LVALUE(&ctx) = &skein_ctx; if (ctx_template != NULL) { @@ -686,15 +685,15 @@ errout: * properties apply to the arguments of this function as to those of * skein_mac_init. */ -/*ARGSUSED*/ static int skein_create_ctx_template(crypto_provider_handle_t provider, crypto_mechanism_t *mechanism, crypto_key_t *key, crypto_spi_ctx_template_t *ctx_template, size_t *ctx_template_size, crypto_req_handle_t req) { - int error; - skein_ctx_t *ctx_tmpl; + (void) provider; + int error; + skein_ctx_t *ctx_tmpl; ctx_tmpl = kmem_alloc(sizeof (*ctx_tmpl), crypto_kmflag(req)); if (ctx_tmpl == NULL) diff --git a/module/icp/os/modconf.c b/module/icp/os/modconf.c index 3743416ed..f1822af4e 100644 --- a/module/icp/os/modconf.c +++ b/module/icp/os/modconf.c @@ -47,6 +47,7 @@ struct mod_ops mod_cryptoops = { static int mod_null(struct modlmisc *modl, struct modlinkage *modlp) { + (void) modl, (void) modlp; return (0); } @@ -56,6 +57,7 @@ mod_null(struct modlmisc *modl, struct modlinkage *modlp) static int mod_infonull(void *modl, struct modlinkage *modlp, int *p0) { + (void) modl, (void) modlp; *p0 = -1; /* for modinfo display */ return (0); } diff --git a/module/icp/os/modhash.c b/module/icp/os/modhash.c index a89787100..8bd06973e 100644 --- a/module/icp/os/modhash.c +++ b/module/icp/os/modhash.c @@ -172,16 +172,16 @@ kmutex_t mh_head_lock; * mod_hash_null_valdtor() * no-op key and value destructors. */ -/*ARGSUSED*/ void mod_hash_null_keydtor(mod_hash_key_t key) { + (void) key; } -/*ARGSUSED*/ void mod_hash_null_valdtor(mod_hash_val_t val) { + (void) val; } /* @@ -198,10 +198,10 @@ mod_hash_null_valdtor(mod_hash_val_t val) * "Compilers: Principles, Tools & Techniques", by Aho, Sethi, Ullman */ -/*ARGSUSED*/ uint_t mod_hash_bystr(void *hash_data, mod_hash_key_t key) { + (void) hash_data; uint_t hash = 0; uint_t g; char *p, *k = (char *)key; @@ -672,10 +672,10 @@ mod_hash_reserve_nosleep(mod_hash_t *hash, mod_hash_hndl_t *handlep) } -/*ARGSUSED*/ void mod_hash_cancel(mod_hash_t *hash, mod_hash_hndl_t *handlep) { + (void) hash; kmem_cache_free(mh_e_cache, *handlep); *handlep = (mod_hash_hndl_t)0; }