aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorXiu Jianfeng2022-09-15 11:36:15 +0800
committerHerbert Xu2022-09-24 16:14:43 +0800
commit33837be33367172d66d1f2bd6964cc41448e6e7c (patch)
tree9d5710ddbe45dbc4a486fa34f61baec36073dc92 /crypto
parent1b79573de717cfabe28221a98afaa6a3ff0e7458 (diff)
crypto: add __init/__exit annotations to init/exit funcs
Add missing __init/__exit annotations to init/exit funcs. Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/async_tx/raid6test.c4
-rw-r--r--crypto/curve25519-generic.c4
-rw-r--r--crypto/dh.c4
-rw-r--r--crypto/ecdh.c4
-rw-r--r--crypto/ecdsa.c4
-rw-r--r--crypto/rsa.c4
-rw-r--r--crypto/sm2.c4
7 files changed, 14 insertions, 14 deletions
diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c
index c9d218e53bcb..9719c7520661 100644
--- a/crypto/async_tx/raid6test.c
+++ b/crypto/async_tx/raid6test.c
@@ -189,7 +189,7 @@ static int test(int disks, int *tests)
}
-static int raid6_test(void)
+static int __init raid6_test(void)
{
int err = 0;
int tests = 0;
@@ -236,7 +236,7 @@ static int raid6_test(void)
return 0;
}
-static void raid6_test_exit(void)
+static void __exit raid6_test_exit(void)
{
}
diff --git a/crypto/curve25519-generic.c b/crypto/curve25519-generic.c
index bd88fd571393..d055b0784c77 100644
--- a/crypto/curve25519-generic.c
+++ b/crypto/curve25519-generic.c
@@ -72,12 +72,12 @@ static struct kpp_alg curve25519_alg = {
.max_size = curve25519_max_size,
};
-static int curve25519_init(void)
+static int __init curve25519_init(void)
{
return crypto_register_kpp(&curve25519_alg);
}
-static void curve25519_exit(void)
+static void __exit curve25519_exit(void)
{
crypto_unregister_kpp(&curve25519_alg);
}
diff --git a/crypto/dh.c b/crypto/dh.c
index 4406aeb1ff61..99c3b2ef7adc 100644
--- a/crypto/dh.c
+++ b/crypto/dh.c
@@ -893,7 +893,7 @@ static struct crypto_template crypto_ffdhe_templates[] = {};
#endif /* CONFIG_CRYPTO_DH_RFC7919_GROUPS */
-static int dh_init(void)
+static int __init dh_init(void)
{
int err;
@@ -911,7 +911,7 @@ static int dh_init(void)
return 0;
}
-static void dh_exit(void)
+static void __exit dh_exit(void)
{
crypto_unregister_templates(crypto_ffdhe_templates,
ARRAY_SIZE(crypto_ffdhe_templates));
diff --git a/crypto/ecdh.c b/crypto/ecdh.c
index e4857d534344..80afee3234fb 100644
--- a/crypto/ecdh.c
+++ b/crypto/ecdh.c
@@ -200,7 +200,7 @@ static struct kpp_alg ecdh_nist_p384 = {
static bool ecdh_nist_p192_registered;
-static int ecdh_init(void)
+static int __init ecdh_init(void)
{
int ret;
@@ -227,7 +227,7 @@ nist_p256_error:
return ret;
}
-static void ecdh_exit(void)
+static void __exit ecdh_exit(void)
{
if (ecdh_nist_p192_registered)
crypto_unregister_kpp(&ecdh_nist_p192);
diff --git a/crypto/ecdsa.c b/crypto/ecdsa.c
index b3a8a6b572ba..fbd76498aba8 100644
--- a/crypto/ecdsa.c
+++ b/crypto/ecdsa.c
@@ -332,7 +332,7 @@ static struct akcipher_alg ecdsa_nist_p192 = {
};
static bool ecdsa_nist_p192_registered;
-static int ecdsa_init(void)
+static int __init ecdsa_init(void)
{
int ret;
@@ -359,7 +359,7 @@ nist_p256_error:
return ret;
}
-static void ecdsa_exit(void)
+static void __exit ecdsa_exit(void)
{
if (ecdsa_nist_p192_registered)
crypto_unregister_akcipher(&ecdsa_nist_p192);
diff --git a/crypto/rsa.c b/crypto/rsa.c
index 0e555ee4addb..c50f2d2a4d06 100644
--- a/crypto/rsa.c
+++ b/crypto/rsa.c
@@ -327,7 +327,7 @@ static struct akcipher_alg rsa = {
},
};
-static int rsa_init(void)
+static int __init rsa_init(void)
{
int err;
@@ -344,7 +344,7 @@ static int rsa_init(void)
return 0;
}
-static void rsa_exit(void)
+static void __exit rsa_exit(void)
{
crypto_unregister_template(&rsa_pkcs1pad_tmpl);
crypto_unregister_akcipher(&rsa);
diff --git a/crypto/sm2.c b/crypto/sm2.c
index f3e1592965c0..ed9307dac3d1 100644
--- a/crypto/sm2.c
+++ b/crypto/sm2.c
@@ -441,12 +441,12 @@ static struct akcipher_alg sm2 = {
},
};
-static int sm2_init(void)
+static int __init sm2_init(void)
{
return crypto_register_akcipher(&sm2);
}
-static void sm2_exit(void)
+static void __exit sm2_exit(void)
{
crypto_unregister_akcipher(&sm2);
}