Skip to content

Commit

Permalink
crypto: add __init/__exit annotations to init/exit funcs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xiu Jianfeng authored and herbertx committed Sep 24, 2022
1 parent 1b79573 commit 33837be
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions crypto/async_tx/raid6test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -236,7 +236,7 @@ static int raid6_test(void)
return 0;
}

static void raid6_test_exit(void)
static void __exit raid6_test_exit(void)
{
}

Expand Down
4 changes: 2 additions & 2 deletions crypto/curve25519-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions crypto/dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions crypto/ecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -227,7 +227,7 @@ static int ecdh_init(void)
return ret;
}

static void ecdh_exit(void)
static void __exit ecdh_exit(void)
{
if (ecdh_nist_p192_registered)
crypto_unregister_kpp(&ecdh_nist_p192);
Expand Down
4 changes: 2 additions & 2 deletions crypto/ecdsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -359,7 +359,7 @@ static int ecdsa_init(void)
return ret;
}

static void ecdsa_exit(void)
static void __exit ecdsa_exit(void)
{
if (ecdsa_nist_p192_registered)
crypto_unregister_akcipher(&ecdsa_nist_p192);
Expand Down
4 changes: 2 additions & 2 deletions crypto/rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static struct akcipher_alg rsa = {
},
};

static int rsa_init(void)
static int __init rsa_init(void)
{
int err;

Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions crypto/sm2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 33837be

Please sign in to comment.