* [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly
@ 2014-05-14 9:40 Marek Vasut
2014-05-14 9:40 ` [PATCH 2/7] crypto: ccp: " Marek Vasut
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Marek Vasut @ 2014-05-14 9:40 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
Use a standard accessor instead of directly digging into a structure.
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/crypto/geode-aes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
NOTE: I didn't compile-test those, but the change should not break anything.
If possible, please test on relevant hardware.
diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 8e482ce..fe538e5 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -255,7 +255,7 @@ geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
static int fallback_init_cip(struct crypto_tfm *tfm)
{
- const char *name = tfm->__crt_alg->cra_name;
+ const char *name = crypto_tfm_alg_name(tfm);
struct geode_aes_op *op = crypto_tfm_ctx(tfm);
op->fallback.cip = crypto_alloc_cipher(name, 0,
@@ -365,7 +365,7 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
static int fallback_init_blk(struct crypto_tfm *tfm)
{
- const char *name = tfm->__crt_alg->cra_name;
+ const char *name = crypto_tfm_alg_name(tfm);
struct geode_aes_op *op = crypto_tfm_ctx(tfm);
op->fallback.blk = crypto_alloc_blkcipher(name, 0,
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/7] crypto: ccp: Don't use tfm->__crt_alg->cra_name directly
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
@ 2014-05-14 9:40 ` Marek Vasut
2014-05-14 9:40 ` [PATCH 3/7] crypto: cesa: " Marek Vasut
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2014-05-14 9:40 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/crypto/ccp/ccp-crypto-aes-xts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
NOTE: I didn't compile-test those, but the change should not break anything.
If possible, please test on relevant hardware.
diff --git a/drivers/crypto/ccp/ccp-crypto-aes-xts.c b/drivers/crypto/ccp/ccp-crypto-aes-xts.c
index 0237ab5..0cc5594 100644
--- a/drivers/crypto/ccp/ccp-crypto-aes-xts.c
+++ b/drivers/crypto/ccp/ccp-crypto-aes-xts.c
@@ -191,12 +191,12 @@ static int ccp_aes_xts_cra_init(struct crypto_tfm *tfm)
ctx->complete = ccp_aes_xts_complete;
ctx->u.aes.key_len = 0;
- fallback_tfm = crypto_alloc_ablkcipher(tfm->__crt_alg->cra_name, 0,
+ fallback_tfm = crypto_alloc_ablkcipher(crypto_tfm_alg_name(tfm), 0,
CRYPTO_ALG_ASYNC |
CRYPTO_ALG_NEED_FALLBACK);
if (IS_ERR(fallback_tfm)) {
pr_warn("could not load fallback driver %s\n",
- tfm->__crt_alg->cra_name);
+ crypto_tfm_alg_name(tfm));
return PTR_ERR(fallback_tfm);
}
ctx->u.aes.tfm_ablkcipher = fallback_tfm;
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/7] crypto: cesa: Don't use tfm->__crt_alg->cra_name directly
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
2014-05-14 9:40 ` [PATCH 2/7] crypto: ccp: " Marek Vasut
@ 2014-05-14 9:40 ` Marek Vasut
2014-05-14 9:41 ` [PATCH 4/7] crypto: dcp: " Marek Vasut
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2014-05-14 9:40 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/crypto/mv_cesa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
NOTE: I didn't compile-test those, but the change should not break anything.
If possible, please test on relevant hardware.
diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 8d1e6f8..1549db7 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -843,7 +843,7 @@ static int mv_hash_setkey(struct crypto_ahash *tfm, const u8 * key,
static int mv_cra_hash_init(struct crypto_tfm *tfm, const char *base_hash_name,
enum hash_op op, int count_add)
{
- const char *fallback_driver_name = tfm->__crt_alg->cra_name;
+ const char *fallback_driver_name = crypto_tfm_alg_name(tfm);
struct mv_tfm_hash_ctx *ctx = crypto_tfm_ctx(tfm);
struct crypto_shash *fallback_tfm = NULL;
struct crypto_shash *base_hash = NULL;
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/7] crypto: dcp: Don't use tfm->__crt_alg->cra_name directly
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
2014-05-14 9:40 ` [PATCH 2/7] crypto: ccp: " Marek Vasut
2014-05-14 9:40 ` [PATCH 3/7] crypto: cesa: " Marek Vasut
@ 2014-05-14 9:41 ` Marek Vasut
2014-05-14 9:41 ` [PATCH 5/7] crypto: n2: " Marek Vasut
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2014-05-14 9:41 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/crypto/mxs-dcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
NOTE: I didn't compile-test those, but the change should not break anything.
If possible, please test on relevant hardware.
diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 7bbe0ab..9017818 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -482,7 +482,7 @@ static int mxs_dcp_aes_setkey(struct crypto_ablkcipher *tfm, const u8 *key,
static int mxs_dcp_aes_fallback_init(struct crypto_tfm *tfm)
{
- const char *name = tfm->__crt_alg->cra_name;
+ const char *name = crypto_tfm_alg_name(tfm);
const uint32_t flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK;
struct dcp_async_ctx *actx = crypto_tfm_ctx(tfm);
struct crypto_ablkcipher *blk;
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/7] crypto: n2: Don't use tfm->__crt_alg->cra_name directly
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
` (2 preceding siblings ...)
2014-05-14 9:41 ` [PATCH 4/7] crypto: dcp: " Marek Vasut
@ 2014-05-14 9:41 ` Marek Vasut
2014-05-14 9:41 ` [PATCH 6/7] crypto: padlock: " Marek Vasut
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2014-05-14 9:41 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/crypto/n2_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
NOTE: I didn't compile-test those, but the change should not break anything.
If possible, please test on relevant hardware.
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index e1f0ab4..7263c10 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -356,7 +356,7 @@ static int n2_hash_async_finup(struct ahash_request *req)
static int n2_hash_cra_init(struct crypto_tfm *tfm)
{
- const char *fallback_driver_name = tfm->__crt_alg->cra_name;
+ const char *fallback_driver_name = crypto_tfm_alg_name(tfm);
struct crypto_ahash *ahash = __crypto_ahash_cast(tfm);
struct n2_hash_ctx *ctx = crypto_ahash_ctx(ahash);
struct crypto_ahash *fallback_tfm;
@@ -391,7 +391,7 @@ static void n2_hash_cra_exit(struct crypto_tfm *tfm)
static int n2_hmac_cra_init(struct crypto_tfm *tfm)
{
- const char *fallback_driver_name = tfm->__crt_alg->cra_name;
+ const char *fallback_driver_name = crypto_tfm_alg_name(tfm);
struct crypto_ahash *ahash = __crypto_ahash_cast(tfm);
struct n2_hmac_ctx *ctx = crypto_ahash_ctx(ahash);
struct n2_hmac_alg *n2alg = n2_hmac_alg(tfm);
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/7] crypto: padlock: Don't use tfm->__crt_alg->cra_name directly
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
` (3 preceding siblings ...)
2014-05-14 9:41 ` [PATCH 5/7] crypto: n2: " Marek Vasut
@ 2014-05-14 9:41 ` Marek Vasut
2014-05-14 9:41 ` [PATCH 7/7] crypto: sahara: " Marek Vasut
2014-05-22 13:09 ` [PATCH 1/7] crypto: geode: " Herbert Xu
6 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2014-05-14 9:41 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/crypto/padlock-sha.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
NOTE: I didn't compile-test those, but the change should not break anything.
If possible, please test on relevant hardware.
diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c
index 9266c0e..bace885 100644
--- a/drivers/crypto/padlock-sha.c
+++ b/drivers/crypto/padlock-sha.c
@@ -211,7 +211,7 @@ static int padlock_sha256_final(struct shash_desc *desc, u8 *out)
static int padlock_cra_init(struct crypto_tfm *tfm)
{
struct crypto_shash *hash = __crypto_shash_cast(tfm);
- const char *fallback_driver_name = tfm->__crt_alg->cra_name;
+ const char *fallback_driver_name = crypto_tfm_alg_name(tfm);
struct padlock_sha_ctx *ctx = crypto_tfm_ctx(tfm);
struct crypto_shash *fallback_tfm;
int err = -ENOMEM;
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 7/7] crypto: sahara: Don't use tfm->__crt_alg->cra_name directly
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
` (4 preceding siblings ...)
2014-05-14 9:41 ` [PATCH 6/7] crypto: padlock: " Marek Vasut
@ 2014-05-14 9:41 ` Marek Vasut
2014-05-22 13:09 ` [PATCH 1/7] crypto: geode: " Herbert Xu
6 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2014-05-14 9:41 UTC (permalink / raw)
To: linux-crypto; +Cc: herbert, Marek Vasut
Signed-off-by: Marek Vasut <marex@denx.de>
---
drivers/crypto/sahara.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
NOTE: I didn't compile-test those, but the change should not break anything.
If possible, please test on relevant hardware.
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 07a5987..164e1ec 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -728,7 +728,7 @@ static int sahara_aes_cbc_decrypt(struct ablkcipher_request *req)
static int sahara_aes_cra_init(struct crypto_tfm *tfm)
{
- const char *name = tfm->__crt_alg->cra_name;
+ const char *name = crypto_tfm_alg_name(tfm);
struct sahara_ctx *ctx = crypto_tfm_ctx(tfm);
ctx->fallback = crypto_alloc_ablkcipher(name, 0,
--
2.0.0.rc0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
` (5 preceding siblings ...)
2014-05-14 9:41 ` [PATCH 7/7] crypto: sahara: " Marek Vasut
@ 2014-05-22 13:09 ` Herbert Xu
6 siblings, 0 replies; 8+ messages in thread
From: Herbert Xu @ 2014-05-22 13:09 UTC (permalink / raw)
To: Marek Vasut; +Cc: linux-crypto
On Wed, May 14, 2014 at 11:40:57AM +0200, Marek Vasut wrote:
> Use a standard accessor instead of directly digging into a structure.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
All applied.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-05-22 13:09 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-14 9:40 [PATCH 1/7] crypto: geode: Don't use tfm->__crt_alg->cra_name directly Marek Vasut
2014-05-14 9:40 ` [PATCH 2/7] crypto: ccp: " Marek Vasut
2014-05-14 9:40 ` [PATCH 3/7] crypto: cesa: " Marek Vasut
2014-05-14 9:41 ` [PATCH 4/7] crypto: dcp: " Marek Vasut
2014-05-14 9:41 ` [PATCH 5/7] crypto: n2: " Marek Vasut
2014-05-14 9:41 ` [PATCH 6/7] crypto: padlock: " Marek Vasut
2014-05-14 9:41 ` [PATCH 7/7] crypto: sahara: " Marek Vasut
2014-05-22 13:09 ` [PATCH 1/7] crypto: geode: " Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).