Skip to content

Commit 33837be

Browse files
Xiu Jianfengherbertx
Xiu Jianfeng
authored andcommitted
crypto: add __init/__exit annotations to init/exit funcs
Add missing __init/__exit annotations to init/exit funcs. Signed-off-by: Xiu Jianfeng <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 1b79573 commit 33837be

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

crypto/async_tx/raid6test.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static int test(int disks, int *tests)
189189
}
190190

191191

192-
static int raid6_test(void)
192+
static int __init raid6_test(void)
193193
{
194194
int err = 0;
195195
int tests = 0;
@@ -236,7 +236,7 @@ static int raid6_test(void)
236236
return 0;
237237
}
238238

239-
static void raid6_test_exit(void)
239+
static void __exit raid6_test_exit(void)
240240
{
241241
}
242242

crypto/curve25519-generic.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ static struct kpp_alg curve25519_alg = {
7272
.max_size = curve25519_max_size,
7373
};
7474

75-
static int curve25519_init(void)
75+
static int __init curve25519_init(void)
7676
{
7777
return crypto_register_kpp(&curve25519_alg);
7878
}
7979

80-
static void curve25519_exit(void)
80+
static void __exit curve25519_exit(void)
8181
{
8282
crypto_unregister_kpp(&curve25519_alg);
8383
}

crypto/dh.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ static struct crypto_template crypto_ffdhe_templates[] = {};
893893
#endif /* CONFIG_CRYPTO_DH_RFC7919_GROUPS */
894894

895895

896-
static int dh_init(void)
896+
static int __init dh_init(void)
897897
{
898898
int err;
899899

@@ -911,7 +911,7 @@ static int dh_init(void)
911911
return 0;
912912
}
913913

914-
static void dh_exit(void)
914+
static void __exit dh_exit(void)
915915
{
916916
crypto_unregister_templates(crypto_ffdhe_templates,
917917
ARRAY_SIZE(crypto_ffdhe_templates));

crypto/ecdh.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static struct kpp_alg ecdh_nist_p384 = {
200200

201201
static bool ecdh_nist_p192_registered;
202202

203-
static int ecdh_init(void)
203+
static int __init ecdh_init(void)
204204
{
205205
int ret;
206206

@@ -227,7 +227,7 @@ static int ecdh_init(void)
227227
return ret;
228228
}
229229

230-
static void ecdh_exit(void)
230+
static void __exit ecdh_exit(void)
231231
{
232232
if (ecdh_nist_p192_registered)
233233
crypto_unregister_kpp(&ecdh_nist_p192);

crypto/ecdsa.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ static struct akcipher_alg ecdsa_nist_p192 = {
332332
};
333333
static bool ecdsa_nist_p192_registered;
334334

335-
static int ecdsa_init(void)
335+
static int __init ecdsa_init(void)
336336
{
337337
int ret;
338338

@@ -359,7 +359,7 @@ static int ecdsa_init(void)
359359
return ret;
360360
}
361361

362-
static void ecdsa_exit(void)
362+
static void __exit ecdsa_exit(void)
363363
{
364364
if (ecdsa_nist_p192_registered)
365365
crypto_unregister_akcipher(&ecdsa_nist_p192);

crypto/rsa.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ static struct akcipher_alg rsa = {
327327
},
328328
};
329329

330-
static int rsa_init(void)
330+
static int __init rsa_init(void)
331331
{
332332
int err;
333333

@@ -344,7 +344,7 @@ static int rsa_init(void)
344344
return 0;
345345
}
346346

347-
static void rsa_exit(void)
347+
static void __exit rsa_exit(void)
348348
{
349349
crypto_unregister_template(&rsa_pkcs1pad_tmpl);
350350
crypto_unregister_akcipher(&rsa);

crypto/sm2.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,12 @@ static struct akcipher_alg sm2 = {
441441
},
442442
};
443443

444-
static int sm2_init(void)
444+
static int __init sm2_init(void)
445445
{
446446
return crypto_register_akcipher(&sm2);
447447
}
448448

449-
static void sm2_exit(void)
449+
static void __exit sm2_exit(void)
450450
{
451451
crypto_unregister_akcipher(&sm2);
452452
}

0 commit comments

Comments
 (0)