Skip to content

Commit 3af5b90

Browse files
kamalesh-babulalherbertx
authored andcommitted
[CRYPTO] all: Clean up init()/fini()
On Thu, Mar 27, 2008 at 03:40:36PM +0100, Bodo Eggert wrote: > Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> wrote: > > > This patch cleanups the crypto code, replaces the init() and fini() > > with the <algorithm name>_init/_fini > > This part ist OK. > > > or init/fini_<algorithm name> (if the > > <algorithm name>_init/_fini exist) > > Having init_foo and foo_init won't be a good thing, will it? I'd start > confusing them. > > What about foo_modinit instead? Thanks for the suggestion, the init() is replaced with <algorithm name>_mod_init () and fini () is replaced with <algorithm name>_mod_fini. Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 7dc748e commit 3af5b90

23 files changed

Lines changed: 92 additions & 92 deletions

crypto/anubis.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -687,21 +687,21 @@ static struct crypto_alg anubis_alg = {
687687
.cia_decrypt = anubis_decrypt } }
688688
};
689689

690-
static int __init init(void)
690+
static int __init anubis_mod_init(void)
691691
{
692692
int ret = 0;
693693

694694
ret = crypto_register_alg(&anubis_alg);
695695
return ret;
696696
}
697697

698-
static void __exit fini(void)
698+
static void __exit anubis_mod_fini(void)
699699
{
700700
crypto_unregister_alg(&anubis_alg);
701701
}
702702

703-
module_init(init);
704-
module_exit(fini);
703+
module_init(anubis_mod_init);
704+
module_exit(anubis_mod_fini);
705705

706706
MODULE_LICENSE("GPL");
707707
MODULE_DESCRIPTION("Anubis Cryptographic Algorithm");

crypto/blowfish.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,18 +465,18 @@ static struct crypto_alg alg = {
465465
.cia_decrypt = bf_decrypt } }
466466
};
467467

468-
static int __init init(void)
468+
static int __init blowfish_mod_init(void)
469469
{
470470
return crypto_register_alg(&alg);
471471
}
472472

473-
static void __exit fini(void)
473+
static void __exit blowfish_mod_fini(void)
474474
{
475475
crypto_unregister_alg(&alg);
476476
}
477477

478-
module_init(init);
479-
module_exit(fini);
478+
module_init(blowfish_mod_init);
479+
module_exit(blowfish_mod_fini);
480480

481481
MODULE_LICENSE("GPL");
482482
MODULE_DESCRIPTION("Blowfish Cipher Algorithm");

crypto/cast5.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,18 +817,18 @@ static struct crypto_alg alg = {
817817
}
818818
};
819819

820-
static int __init init(void)
820+
static int __init cast5_mod_init(void)
821821
{
822822
return crypto_register_alg(&alg);
823823
}
824824

825-
static void __exit fini(void)
825+
static void __exit cast5_mod_fini(void)
826826
{
827827
crypto_unregister_alg(&alg);
828828
}
829829

830-
module_init(init);
831-
module_exit(fini);
830+
module_init(cast5_mod_init);
831+
module_exit(cast5_mod_fini);
832832

833833
MODULE_LICENSE("GPL");
834834
MODULE_DESCRIPTION("Cast5 Cipher Algorithm");

crypto/cast6.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,18 +528,18 @@ static struct crypto_alg alg = {
528528
}
529529
};
530530

531-
static int __init init(void)
531+
static int __init cast6_mod_init(void)
532532
{
533533
return crypto_register_alg(&alg);
534534
}
535535

536-
static void __exit fini(void)
536+
static void __exit cast6_mod_fini(void)
537537
{
538538
crypto_unregister_alg(&alg);
539539
}
540540

541-
module_init(init);
542-
module_exit(fini);
541+
module_init(cast6_mod_init);
542+
module_exit(cast6_mod_fini);
543543

544544
MODULE_LICENSE("GPL");
545545
MODULE_DESCRIPTION("Cast6 Cipher Algorithm");

crypto/crc32c.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,18 @@ static struct crypto_alg alg = {
9898
}
9999
};
100100

101-
static int __init init(void)
101+
static int __init crc32c_mod_init(void)
102102
{
103103
return crypto_register_alg(&alg);
104104
}
105105

106-
static void __exit fini(void)
106+
static void __exit crc32c_mod_fini(void)
107107
{
108108
crypto_unregister_alg(&alg);
109109
}
110110

111-
module_init(init);
112-
module_exit(fini);
111+
module_init(crc32c_mod_init);
112+
module_exit(crc32c_mod_fini);
113113

114114
MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
115115
MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations wrapper for lib/crc32c");

crypto/crypto_null.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ MODULE_ALIAS("compress_null");
142142
MODULE_ALIAS("digest_null");
143143
MODULE_ALIAS("cipher_null");
144144

145-
static int __init init(void)
145+
static int __init crypto_null_mod_init(void)
146146
{
147147
int ret = 0;
148148

@@ -174,16 +174,16 @@ static int __init init(void)
174174
goto out;
175175
}
176176

177-
static void __exit fini(void)
177+
static void __exit crypto_null_mod_fini(void)
178178
{
179179
crypto_unregister_alg(&compress_null);
180180
crypto_unregister_alg(&digest_null);
181181
crypto_unregister_alg(&skcipher_null);
182182
crypto_unregister_alg(&cipher_null);
183183
}
184184

185-
module_init(init);
186-
module_exit(fini);
185+
module_init(crypto_null_mod_init);
186+
module_exit(crypto_null_mod_fini);
187187

188188
MODULE_LICENSE("GPL");
189189
MODULE_DESCRIPTION("Null Cryptographic Algorithms");

crypto/deflate.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,18 @@ static struct crypto_alg alg = {
208208
.coa_decompress = deflate_decompress } }
209209
};
210210

211-
static int __init init(void)
211+
static int __init deflate_mod_init(void)
212212
{
213213
return crypto_register_alg(&alg);
214214
}
215215

216-
static void __exit fini(void)
216+
static void __exit deflate_mod_fini(void)
217217
{
218218
crypto_unregister_alg(&alg);
219219
}
220220

221-
module_init(init);
222-
module_exit(fini);
221+
module_init(deflate_mod_init);
222+
module_exit(deflate_mod_fini);
223223

224224
MODULE_LICENSE("GPL");
225225
MODULE_DESCRIPTION("Deflate Compression Algorithm for IPCOMP");

crypto/des_generic.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ static struct crypto_alg des3_ede_alg = {
977977

978978
MODULE_ALIAS("des3_ede");
979979

980-
static int __init init(void)
980+
static int __init des_generic_mod_init(void)
981981
{
982982
int ret = 0;
983983

@@ -992,14 +992,14 @@ static int __init init(void)
992992
return ret;
993993
}
994994

995-
static void __exit fini(void)
995+
static void __exit des_generic_mod_fini(void)
996996
{
997997
crypto_unregister_alg(&des3_ede_alg);
998998
crypto_unregister_alg(&des_alg);
999999
}
10001000

1001-
module_init(init);
1002-
module_exit(fini);
1001+
module_init(des_generic_mod_init);
1002+
module_exit(des_generic_mod_fini);
10031003

10041004
MODULE_LICENSE("GPL");
10051005
MODULE_DESCRIPTION("DES & Triple DES EDE Cipher Algorithms");

crypto/fcrypt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,18 +405,18 @@ static struct crypto_alg fcrypt_alg = {
405405
.cia_decrypt = fcrypt_decrypt } }
406406
};
407407

408-
static int __init init(void)
408+
static int __init fcrypt_mod_init(void)
409409
{
410410
return crypto_register_alg(&fcrypt_alg);
411411
}
412412

413-
static void __exit fini(void)
413+
static void __exit fcrypt_mod_fini(void)
414414
{
415415
crypto_unregister_alg(&fcrypt_alg);
416416
}
417417

418-
module_init(init);
419-
module_exit(fini);
418+
module_init(fcrypt_mod_init);
419+
module_exit(fcrypt_mod_fini);
420420

421421
MODULE_LICENSE("Dual BSD/GPL");
422422
MODULE_DESCRIPTION("FCrypt Cipher Algorithm");

crypto/khazad.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -862,22 +862,22 @@ static struct crypto_alg khazad_alg = {
862862
.cia_decrypt = khazad_decrypt } }
863863
};
864864

865-
static int __init init(void)
865+
static int __init khazad_mod_init(void)
866866
{
867867
int ret = 0;
868868

869869
ret = crypto_register_alg(&khazad_alg);
870870
return ret;
871871
}
872872

873-
static void __exit fini(void)
873+
static void __exit khazad_mod_fini(void)
874874
{
875875
crypto_unregister_alg(&khazad_alg);
876876
}
877877

878878

879-
module_init(init);
880-
module_exit(fini);
879+
module_init(khazad_mod_init);
880+
module_exit(khazad_mod_fini);
881881

882882
MODULE_LICENSE("GPL");
883883
MODULE_DESCRIPTION("Khazad Cryptographic Algorithm");

0 commit comments

Comments
 (0)