aboutsummaryrefslogtreecommitdiffstats
path: root/module/icp/io
diff options
context:
space:
mode:
authorMark Wright <[email protected]>2017-11-29 10:33:48 +1100
committerBrian Behlendorf <[email protected]>2017-11-28 17:33:48 -0600
commit56d8d8ace4724bde16145be25b75d8f551961813 (patch)
treea8b73d0e193fa5a6c649ff6318466a7fc29c932c /module/icp/io
parent48ac22d8559313b2a33a80b9690aeea9acb9976c (diff)
Linux 4.14 compat: CONFIG_GCC_PLUGIN_RANDSTRUCT
Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Mark Wright <[email protected]> Closes #5390 Closes #6903
Diffstat (limited to 'module/icp/io')
-rw-r--r--module/icp/io/aes.c36
-rw-r--r--module/icp/io/sha1_mod.c28
-rw-r--r--module/icp/io/sha2_mod.c28
-rw-r--r--module/icp/io/skein_mod.c28
4 files changed, 60 insertions, 60 deletions
diff --git a/module/icp/io/aes.c b/module/icp/io/aes.c
index 12d57ed79..c15931c6f 100644
--- a/module/icp/io/aes.c
+++ b/module/icp/io/aes.c
@@ -132,16 +132,16 @@ static int aes_decrypt_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_data_t *, crypto_spi_ctx_template_t, crypto_req_handle_t);
static crypto_cipher_ops_t aes_cipher_ops = {
- aes_encrypt_init,
- aes_encrypt,
- aes_encrypt_update,
- aes_encrypt_final,
- aes_encrypt_atomic,
- aes_decrypt_init,
- aes_decrypt,
- aes_decrypt_update,
- aes_decrypt_final,
- aes_decrypt_atomic
+ .encrypt_init = aes_encrypt_init,
+ .encrypt = aes_encrypt,
+ .encrypt_update = aes_encrypt_update,
+ .encrypt_final = aes_encrypt_final,
+ .encrypt_atomic = aes_encrypt_atomic,
+ .decrypt_init = aes_decrypt_init,
+ .decrypt = aes_decrypt,
+ .decrypt_update = aes_decrypt_update,
+ .decrypt_final = aes_decrypt_final,
+ .decrypt_atomic = aes_decrypt_atomic
};
static int aes_mac_atomic(crypto_provider_handle_t, crypto_session_id_t,
@@ -152,12 +152,12 @@ static int aes_mac_verify_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_spi_ctx_template_t, crypto_req_handle_t);
static crypto_mac_ops_t aes_mac_ops = {
- NULL,
- NULL,
- NULL,
- NULL,
- aes_mac_atomic,
- aes_mac_verify_atomic
+ .mac_init = NULL,
+ .mac = NULL,
+ .mac_update = NULL,
+ .mac_final = NULL,
+ .mac_atomic = aes_mac_atomic,
+ .mac_verify_atomic = aes_mac_verify_atomic
};
static int aes_create_ctx_template(crypto_provider_handle_t,
@@ -166,8 +166,8 @@ static int aes_create_ctx_template(crypto_provider_handle_t,
static int aes_free_context(crypto_ctx_t *);
static crypto_ctx_ops_t aes_ctx_ops = {
- aes_create_ctx_template,
- aes_free_context
+ .create_ctx_template = aes_create_ctx_template,
+ .free_context = aes_free_context
};
static crypto_ops_t aes_crypto_ops = {{{{{
diff --git a/module/icp/io/sha1_mod.c b/module/icp/io/sha1_mod.c
index a278dac7f..a6f4e421e 100644
--- a/module/icp/io/sha1_mod.c
+++ b/module/icp/io/sha1_mod.c
@@ -115,12 +115,12 @@ static int sha1_digest_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_req_handle_t);
static crypto_digest_ops_t sha1_digest_ops = {
- sha1_digest_init,
- sha1_digest,
- sha1_digest_update,
- NULL,
- sha1_digest_final,
- sha1_digest_atomic
+ .digest_init = sha1_digest_init,
+ .digest = sha1_digest,
+ .digest_update = sha1_digest_update,
+ .digest_key = NULL,
+ .digest_final = sha1_digest_final,
+ .digest_atomic = sha1_digest_atomic
};
static int sha1_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *,
@@ -136,12 +136,12 @@ static int sha1_mac_verify_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_spi_ctx_template_t, crypto_req_handle_t);
static crypto_mac_ops_t sha1_mac_ops = {
- sha1_mac_init,
- NULL,
- sha1_mac_update,
- sha1_mac_final,
- sha1_mac_atomic,
- sha1_mac_verify_atomic
+ .mac_init = sha1_mac_init,
+ .mac = NULL,
+ .mac_update = sha1_mac_update,
+ .mac_final = sha1_mac_final,
+ .mac_atomic = sha1_mac_atomic,
+ .mac_verify_atomic = sha1_mac_verify_atomic
};
static int sha1_create_ctx_template(crypto_provider_handle_t,
@@ -150,8 +150,8 @@ static int sha1_create_ctx_template(crypto_provider_handle_t,
static int sha1_free_context(crypto_ctx_t *);
static crypto_ctx_ops_t sha1_ctx_ops = {
- sha1_create_ctx_template,
- sha1_free_context
+ .create_ctx_template = sha1_create_ctx_template,
+ .free_context = sha1_free_context
};
static crypto_ops_t sha1_crypto_ops = {{{{{
diff --git a/module/icp/io/sha2_mod.c b/module/icp/io/sha2_mod.c
index 8a3514c80..206740492 100644
--- a/module/icp/io/sha2_mod.c
+++ b/module/icp/io/sha2_mod.c
@@ -143,12 +143,12 @@ static int sha2_digest_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_req_handle_t);
static crypto_digest_ops_t sha2_digest_ops = {
- sha2_digest_init,
- sha2_digest,
- sha2_digest_update,
- NULL,
- sha2_digest_final,
- sha2_digest_atomic
+ .digest_init = sha2_digest_init,
+ .digest = sha2_digest,
+ .digest_update = sha2_digest_update,
+ .digest_key = NULL,
+ .digest_final = sha2_digest_final,
+ .digest_atomic = sha2_digest_atomic
};
static int sha2_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *,
@@ -164,12 +164,12 @@ static int sha2_mac_verify_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_spi_ctx_template_t, crypto_req_handle_t);
static crypto_mac_ops_t sha2_mac_ops = {
- sha2_mac_init,
- NULL,
- sha2_mac_update,
- sha2_mac_final,
- sha2_mac_atomic,
- sha2_mac_verify_atomic
+ .mac_init = sha2_mac_init,
+ .mac = NULL,
+ .mac_update = sha2_mac_update,
+ .mac_final = sha2_mac_final,
+ .mac_atomic = sha2_mac_atomic,
+ .mac_verify_atomic = sha2_mac_verify_atomic
};
static int sha2_create_ctx_template(crypto_provider_handle_t,
@@ -178,8 +178,8 @@ static int sha2_create_ctx_template(crypto_provider_handle_t,
static int sha2_free_context(crypto_ctx_t *);
static crypto_ctx_ops_t sha2_ctx_ops = {
- sha2_create_ctx_template,
- sha2_free_context
+ .create_ctx_template = sha2_create_ctx_template,
+ .free_context = sha2_free_context
};
static crypto_ops_t sha2_crypto_ops = {{{{{
diff --git a/module/icp/io/skein_mod.c b/module/icp/io/skein_mod.c
index 6db31c355..90e8a6a02 100644
--- a/module/icp/io/skein_mod.c
+++ b/module/icp/io/skein_mod.c
@@ -88,12 +88,12 @@ static int skein_digest_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_req_handle_t);
static crypto_digest_ops_t skein_digest_ops = {
- skein_digest_init,
- skein_digest,
- skein_update,
- NULL,
- skein_final,
- skein_digest_atomic
+ .digest_init = skein_digest_init,
+ .digest = skein_digest,
+ .digest_update = skein_update,
+ .digest_key = NULL,
+ .digest_final = skein_final,
+ .digest_atomic = skein_digest_atomic
};
static int skein_mac_init(crypto_ctx_t *, crypto_mechanism_t *, crypto_key_t *,
@@ -103,12 +103,12 @@ static int skein_mac_atomic(crypto_provider_handle_t, crypto_session_id_t,
crypto_spi_ctx_template_t, crypto_req_handle_t);
static crypto_mac_ops_t skein_mac_ops = {
- skein_mac_init,
- NULL,
- skein_update, /* using regular digest update is OK here */
- skein_final, /* using regular digest final is OK here */
- skein_mac_atomic,
- NULL
+ .mac_init = skein_mac_init,
+ .mac = NULL,
+ .mac_update = skein_update, /* using regular digest update is OK here */
+ .mac_final = skein_final, /* using regular digest final is OK here */
+ .mac_atomic = skein_mac_atomic,
+ .mac_verify_atomic = NULL
};
static int skein_create_ctx_template(crypto_provider_handle_t,
@@ -117,8 +117,8 @@ static int skein_create_ctx_template(crypto_provider_handle_t,
static int skein_free_context(crypto_ctx_t *);
static crypto_ctx_ops_t skein_ctx_ops = {
- skein_create_ctx_template,
- skein_free_context
+ .create_ctx_template = skein_create_ctx_template,
+ .free_context = skein_free_context
};
static crypto_ops_t skein_crypto_ops = {{{{{