Skip to content

Commit 37743cc

Browse files
jkivilinherbertx
authored andcommitted
crypto: arch/s390 - cleanup - remove unneeded cra_list initialization
Initialization of cra_list is currently mixed, most ciphers initialize this field and most shashes do not. Initialization however is not needed at all since cra_list is initialized/overwritten in __crypto_register_alg() with list_add(). Therefore perform cleanup to remove all unneeded initializations of this field in 'arch/s390/crypto/' Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: linux-s390@vger.kernel.org Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent e15aa36 commit 37743cc

3 files changed

Lines changed: 0 additions & 16 deletions

File tree

‎arch/s390/crypto/aes_s390.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ static struct crypto_alg aes_alg = {
216216
.cra_blocksize = AES_BLOCK_SIZE,
217217
.cra_ctxsize = sizeof(struct s390_aes_ctx),
218218
.cra_module = THIS_MODULE,
219-
.cra_list = LIST_HEAD_INIT(aes_alg.cra_list),
220219
.cra_init = fallback_init_cip,
221220
.cra_exit = fallback_exit_cip,
222221
.cra_u = {
@@ -398,7 +397,6 @@ static struct crypto_alg ecb_aes_alg = {
398397
.cra_ctxsize = sizeof(struct s390_aes_ctx),
399398
.cra_type = &crypto_blkcipher_type,
400399
.cra_module = THIS_MODULE,
401-
.cra_list = LIST_HEAD_INIT(ecb_aes_alg.cra_list),
402400
.cra_init = fallback_init_blk,
403401
.cra_exit = fallback_exit_blk,
404402
.cra_u = {
@@ -508,7 +506,6 @@ static struct crypto_alg cbc_aes_alg = {
508506
.cra_ctxsize = sizeof(struct s390_aes_ctx),
509507
.cra_type = &crypto_blkcipher_type,
510508
.cra_module = THIS_MODULE,
511-
.cra_list = LIST_HEAD_INIT(cbc_aes_alg.cra_list),
512509
.cra_init = fallback_init_blk,
513510
.cra_exit = fallback_exit_blk,
514511
.cra_u = {
@@ -710,7 +707,6 @@ static struct crypto_alg xts_aes_alg = {
710707
.cra_ctxsize = sizeof(struct s390_xts_ctx),
711708
.cra_type = &crypto_blkcipher_type,
712709
.cra_module = THIS_MODULE,
713-
.cra_list = LIST_HEAD_INIT(xts_aes_alg.cra_list),
714710
.cra_init = xts_fallback_init,
715711
.cra_exit = xts_fallback_exit,
716712
.cra_u = {
@@ -832,7 +828,6 @@ static struct crypto_alg ctr_aes_alg = {
832828
.cra_ctxsize = sizeof(struct s390_aes_ctx),
833829
.cra_type = &crypto_blkcipher_type,
834830
.cra_module = THIS_MODULE,
835-
.cra_list = LIST_HEAD_INIT(ctr_aes_alg.cra_list),
836831
.cra_u = {
837832
.blkcipher = {
838833
.min_keysize = AES_MIN_KEY_SIZE,

‎arch/s390/crypto/des_s390.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ static struct crypto_alg des_alg = {
7070
.cra_blocksize = DES_BLOCK_SIZE,
7171
.cra_ctxsize = sizeof(struct s390_des_ctx),
7272
.cra_module = THIS_MODULE,
73-
.cra_list = LIST_HEAD_INIT(des_alg.cra_list),
7473
.cra_u = {
7574
.cipher = {
7675
.cia_min_keysize = DES_KEY_SIZE,
@@ -163,7 +162,6 @@ static struct crypto_alg ecb_des_alg = {
163162
.cra_ctxsize = sizeof(struct s390_des_ctx),
164163
.cra_type = &crypto_blkcipher_type,
165164
.cra_module = THIS_MODULE,
166-
.cra_list = LIST_HEAD_INIT(ecb_des_alg.cra_list),
167165
.cra_u = {
168166
.blkcipher = {
169167
.min_keysize = DES_KEY_SIZE,
@@ -206,7 +204,6 @@ static struct crypto_alg cbc_des_alg = {
206204
.cra_ctxsize = sizeof(struct s390_des_ctx),
207205
.cra_type = &crypto_blkcipher_type,
208206
.cra_module = THIS_MODULE,
209-
.cra_list = LIST_HEAD_INIT(cbc_des_alg.cra_list),
210207
.cra_u = {
211208
.blkcipher = {
212209
.min_keysize = DES_KEY_SIZE,
@@ -271,7 +268,6 @@ static struct crypto_alg des3_alg = {
271268
.cra_blocksize = DES_BLOCK_SIZE,
272269
.cra_ctxsize = sizeof(struct s390_des_ctx),
273270
.cra_module = THIS_MODULE,
274-
.cra_list = LIST_HEAD_INIT(des3_alg.cra_list),
275271
.cra_u = {
276272
.cipher = {
277273
.cia_min_keysize = DES3_KEY_SIZE,
@@ -314,8 +310,6 @@ static struct crypto_alg ecb_des3_alg = {
314310
.cra_ctxsize = sizeof(struct s390_des_ctx),
315311
.cra_type = &crypto_blkcipher_type,
316312
.cra_module = THIS_MODULE,
317-
.cra_list = LIST_HEAD_INIT(
318-
ecb_des3_alg.cra_list),
319313
.cra_u = {
320314
.blkcipher = {
321315
.min_keysize = DES3_KEY_SIZE,
@@ -358,8 +352,6 @@ static struct crypto_alg cbc_des3_alg = {
358352
.cra_ctxsize = sizeof(struct s390_des_ctx),
359353
.cra_type = &crypto_blkcipher_type,
360354
.cra_module = THIS_MODULE,
361-
.cra_list = LIST_HEAD_INIT(
362-
cbc_des3_alg.cra_list),
363355
.cra_u = {
364356
.blkcipher = {
365357
.min_keysize = DES3_KEY_SIZE,
@@ -452,7 +444,6 @@ static struct crypto_alg ctr_des_alg = {
452444
.cra_ctxsize = sizeof(struct s390_des_ctx),
453445
.cra_type = &crypto_blkcipher_type,
454446
.cra_module = THIS_MODULE,
455-
.cra_list = LIST_HEAD_INIT(ctr_des_alg.cra_list),
456447
.cra_u = {
457448
.blkcipher = {
458449
.min_keysize = DES_KEY_SIZE,
@@ -496,7 +487,6 @@ static struct crypto_alg ctr_des3_alg = {
496487
.cra_ctxsize = sizeof(struct s390_des_ctx),
497488
.cra_type = &crypto_blkcipher_type,
498489
.cra_module = THIS_MODULE,
499-
.cra_list = LIST_HEAD_INIT(ctr_des3_alg.cra_list),
500490
.cra_u = {
501491
.blkcipher = {
502492
.min_keysize = DES3_KEY_SIZE,

‎arch/s390/crypto/ghash_s390.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ static struct shash_alg ghash_alg = {
135135
.cra_blocksize = GHASH_BLOCK_SIZE,
136136
.cra_ctxsize = sizeof(struct ghash_ctx),
137137
.cra_module = THIS_MODULE,
138-
.cra_list = LIST_HEAD_INIT(ghash_alg.base.cra_list),
139138
},
140139
};
141140

0 commit comments

Comments
 (0)