[PATCH] [RFC] crypto: cesa: Don't use tfm->__crt_alg->cra_type directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The checking for the type of algorithm implementation is pretty
strange here. Use regular flags to check for the type instead.

Signed-off-by: Marek Vasut <marex@xxxxxxx>
Cc: Bill Pemberton <wfp5p@xxxxxxxxxxxx>
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Cc: Kent Yoder <key@xxxxxxxxxxxxxxxxxx>
Cc: Jamie Iles <jamie@xxxxxxxxxxxxx>
Cc: Phil Sutter <phil.sutter@xxxxxxxxxxxx>
---
 drivers/crypto/mv_cesa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

NOTE: I am not sure this is correct, please review proper.

diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 1549db7..29d0ee5 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -622,8 +622,8 @@ static int queue_manag(void *data)
 		}
 
 		if (async_req) {
-			if (async_req->tfm->__crt_alg->cra_type !=
-			    &crypto_ahash_type) {
+			if (crypto_tfm_alg_type(async_req->tfm) !=
+			    CRYPTO_ALG_TYPE_AHASH) {
 				struct ablkcipher_request *req =
 				    ablkcipher_request_cast(async_req);
 				mv_start_new_crypt_req(req);
-- 
2.0.0.rc0

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux