Skip to content

Commit

Permalink
crypto: algapi - remove unused notifications
Browse files Browse the repository at this point in the history
There is a message posted to the crypto notifier chain when an algorithm
is unregistered, and when a template is registered or unregistered.  But
nothing is listening for those messages; currently there are only
listeners for the algorithm request and registration messages.

Get rid of these unused notifications for now.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
ebiggers authored and herbertx committed Jan 5, 2018
1 parent ce8614a commit 8b55107
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
5 changes: 0 additions & 5 deletions crypto/algapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ static void crypto_remove_instance(struct crypto_instance *inst,
if (!tmpl || !crypto_tmpl_get(tmpl))
return;

crypto_notify(CRYPTO_MSG_ALG_UNREGISTER, &inst->alg);
list_move(&inst->alg.cra_list, list);
hlist_del(&inst->list);
inst->alg.cra_destroy = crypto_destroy_instance;
Expand Down Expand Up @@ -380,7 +379,6 @@ static int crypto_remove_alg(struct crypto_alg *alg, struct list_head *list)

alg->cra_flags |= CRYPTO_ALG_DEAD;

crypto_notify(CRYPTO_MSG_ALG_UNREGISTER, alg);
list_del_init(&alg->cra_list);
crypto_remove_spawns(alg, list, NULL);

Expand Down Expand Up @@ -458,7 +456,6 @@ int crypto_register_template(struct crypto_template *tmpl)
}

list_add(&tmpl->list, &crypto_template_list);
crypto_notify(CRYPTO_MSG_TMPL_REGISTER, tmpl);
err = 0;
out:
up_write(&crypto_alg_sem);
Expand All @@ -485,8 +482,6 @@ void crypto_unregister_template(struct crypto_template *tmpl)
BUG_ON(err);
}

crypto_notify(CRYPTO_MSG_TMPL_UNREGISTER, tmpl);

up_write(&crypto_alg_sem);

hlist_for_each_entry_safe(inst, n, list, list) {
Expand Down
3 changes: 0 additions & 3 deletions crypto/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
enum {
CRYPTO_MSG_ALG_REQUEST,
CRYPTO_MSG_ALG_REGISTER,
CRYPTO_MSG_ALG_UNREGISTER,
CRYPTO_MSG_TMPL_REGISTER,
CRYPTO_MSG_TMPL_UNREGISTER,
};

struct crypto_instance;
Expand Down

0 comments on commit 8b55107

Please sign in to comment.