[PATCH v4 15/19] crypto: talitos - Remove alg settings in talitos_register_common()
Paul Louvel <[email protected]>
| Newsgroups | org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Algorithm properties are now set at compile time for those who are not dependent on runtime features. Remove now-unused function and struct member. Signed-off-by: Paul Louvel <[email protected]> --- drivers/crypto/talitos/talitos.c | 23 ----------------------- drivers/crypto/talitos/talitos.h | 1 - 2 files changed, 24 deletions(-) diff --git a/drivers/crypto/talitos/talitos.c b/drivers/crypto/talitos/talitos.c index 52ff5ef46fb6..ff938cc4e837 100644 --- a/drivers/crypto/talitos/talitos.c +++ b/drivers/crypto/talitos/talitos.c @@ -1040,23 +1040,6 @@ static void talitos_remove(struct platform_device *ofdev) tasklet_kill(&priv->done_task[1]); } -static void talitos_alg_set_common(struct talitos_private *priv, - struct crypto_alg *alg, u32 custom_priority, - u32 type) -{ - alg->cra_module = THIS_MODULE; - if (custom_priority) - alg->cra_priority = custom_priority; - else - alg->cra_priority = TALITOS_CRA_PRIORITY; - if (has_ftr_sec1(priv) && type != CRYPTO_ALG_TYPE_AHASH) - alg->cra_alignmask = 3; - else - alg->cra_alignmask = 0; - alg->cra_ctxsize = sizeof(struct talitos_ctx); - alg->cra_flags |= CRYPTO_ALG_KERN_DRIVER_ONLY; -} - int talitos_register_common(struct device *dev, struct talitos_alg_template *template) { @@ -1075,20 +1058,14 @@ int talitos_register_common(struct device *dev, switch (t_alg->algt.type) { case CRYPTO_ALG_TYPE_AHASH: alg = &t_alg->algt.alg.hash.halg.base; - talitos_alg_set_common(priv, alg, t_alg->algt.priority, - t_alg->algt.type); ret = crypto_register_ahash(&t_alg->algt.alg.hash); break; case CRYPTO_ALG_TYPE_SKCIPHER: alg = &t_alg->algt.alg.skcipher.base; - talitos_alg_set_common(priv, alg, t_alg->algt.priority, - t_alg->algt.type); ret = crypto_register_skcipher(&t_alg->algt.alg.skcipher); break; case CRYPTO_ALG_TYPE_AEAD: alg = &t_alg->algt.alg.aead.base; - talitos_alg_set_common(priv, alg, t_alg->algt.priority, - t_alg->algt.type); ret = crypto_register_aead(&t_alg->algt.alg.aead); break; default: diff --git a/drivers/crypto/talitos/talitos.h b/drivers/crypto/talitos/talitos.h index e36a2609d87d..3cbce0be705d 100644 --- a/drivers/crypto/talitos/talitos.h +++ b/drivers/crypto/talitos/talitos.h @@ -203,7 +203,6 @@ struct talitos_ctx { struct talitos_alg_template { u32 type; - u32 priority; union { struct skcipher_alg skcipher; struct ahash_alg hash; -- 2.55.0