mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
module: icp: fix unused, remove argsused
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12844
This commit is contained in:
+7
-7
@@ -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;
|
||||
|
||||
+10
-10
@@ -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);
|
||||
|
||||
|
||||
+10
-10
@@ -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;
|
||||
|
||||
+13
-14
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user