Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752047AbbKYRvD (ORCPT ); Wed, 25 Nov 2015 12:51:03 -0500 Received: from mail-lf0-f54.google.com ([209.85.215.54]:35002 "EHLO mail-lf0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbbKYRuy (ORCPT ); Wed, 25 Nov 2015 12:50:54 -0500 From: Alexander Kuleshov To: Herbert Xu Cc: "David S . Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Kuleshov Subject: [PATCH] crypto/cryptod: use crypto_skcipher_type() for getting skcipher type Date: Wed, 25 Nov 2015 23:48:28 +0600 Message-Id: <1448473708-9609-1-git-send-email-kuleshovmail@gmail.com> X-Mailer: git-send-email 2.6.2.485.g1bc8fea Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1173 Lines: 30 The provides inline function - crypto_skcipher_type(). Let's use it in the cryptd_alloc_ablkcipher() instead of direct calculation. Signed-off-by: Alexander Kuleshov --- crypto/cryptd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crypto/cryptd.c b/crypto/cryptd.c index c81861b..c4af8aa 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -887,8 +887,7 @@ struct cryptd_ablkcipher *cryptd_alloc_ablkcipher(const char *alg_name, if (snprintf(cryptd_alg_name, CRYPTO_MAX_ALG_NAME, "cryptd(%s)", alg_name) >= CRYPTO_MAX_ALG_NAME) return ERR_PTR(-EINVAL); - type &= ~(CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_GENIV); - type |= CRYPTO_ALG_TYPE_BLKCIPHER; + type = crypto_skcipher_type(type); mask &= ~CRYPTO_ALG_TYPE_MASK; mask |= (CRYPTO_ALG_GENIV | CRYPTO_ALG_TYPE_BLKCIPHER_MASK); tfm = crypto_alloc_base(cryptd_alg_name, type, mask); -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/