Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp296830ybt; Thu, 9 Jul 2020 23:23:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqJ6K8e4GdTreN7wUa6bDy+WV9oWNYHtJwESSOXwcRoeC1dAf+8Y0/36x89GP5usoblWwz X-Received: by 2002:aa7:ccd5:: with SMTP id y21mr73750391edt.91.1594362194918; Thu, 09 Jul 2020 23:23:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594362194; cv=none; d=google.com; s=arc-20160816; b=NzqbvWgZ2gdBXztnejAnSqQYCCYSrzD94aw9OUOZf4A1pqPWXrTM7IIPHRqMVbPfwV BIyy/Upxt+hCiWlQVAtAql7bS0O9X7AwEUPewLz1BqNckpSCACFn5AEzTTH0JT5f7fXI FIo53g7tbv2L2IU6A8O8231tNJFH8x2+jt3snyXWRl8lBHcaK1ZuYGGOsSGM7zpnYQJF aFSxk7V8kDPdAA1EZxyYT1SvH6fuDKmC9019R01/M15/Ey2c0/5jdvl+wAOy4XPScanN 9ZOqYB6zLgHSIrQKsVQ6VYk3WQ6kvdglL5SZ5CJqWYoPGgQLBrV6Oaut584BbM9V6zlq o6yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KtFVnx9MsJs9AkMO+189svS+GDRssBnTBqCzRX85mYU=; b=AUC3smZuP/MPTo1OShCAsZY2dElh/9OBDCueNubQ90LBQGAb8G03xwdIbDNRas7/A0 zsDc2x6IWlAWNMTqjtiFdLJPTSDZX6vwxXnR8VVu8gTJro7WwQwkVpShvNxzUJWYM2Yj x5VTUaRH7RgyY/fOvv9dyYDdRs/MQhQCa9TGmEcNKobj12OnBVvnKBy2ElMxmCXJ90mR /v/GkvjAAMia0rQaFwFOzv7wGo4Hx6I0C01Yu8k227Bp5X6IWMqw4K2Dt43IlobWYMpA jtqmGixbsP1LIYmtZgEkxMb79UFfxYfWRBq5wFv1ykcxlsrY5H6h89bcwAmFsILpyct0 LpFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f8cQq3KV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si3100664ejk.642.2020.07.09.23.22.52; Thu, 09 Jul 2020 23:23:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f8cQq3KV; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726907AbgGJGVq (ORCPT + 99 others); Fri, 10 Jul 2020 02:21:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:38977 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbgGJGVp (ORCPT ); Fri, 10 Jul 2020 02:21:45 -0400 Received: from sol.hsd1.ca.comcast.net (c-107-3-166-239.hsd1.ca.comcast.net [107.3.166.239]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3C31A2077D; Fri, 10 Jul 2020 06:21:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594362105; bh=M2LJLdqjUm7yfCY4y6nL/ZL6rGEtyApO+/OjoQPAIs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f8cQq3KV1EfHe3mQ+vEN6lNpWqnpJ6wjWy7MJLZ3qflkELWXRg71D6e2NMOBkqRB0 fgqA9LQbSA8+WAppEVe8wZtwamoDU7REcPu74zzD4gIbqXeOUQrppSosPjqkGGV6oQ QXV7il+VeiXbhbvt6JL4+T3VCNl1kQ1LDrHDRF/A= From: Eric Biggers To: Mikulas Patocka , linux-crypto@vger.kernel.org Cc: dm-devel@redhat.com Subject: [PATCH v2 1/7] crypto: geniv - remove unneeded arguments from aead_geniv_alloc() Date: Thu, 9 Jul 2020 23:20:36 -0700 Message-Id: <20200710062042.113842-2-ebiggers@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200710062042.113842-1-ebiggers@kernel.org> References: <20200710062042.113842-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Eric Biggers The type and mask arguments to aead_geniv_alloc() are always 0, so remove them. Signed-off-by: Eric Biggers --- crypto/echainiv.c | 2 +- crypto/geniv.c | 7 ++++--- crypto/seqiv.c | 2 +- include/crypto/internal/geniv.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crypto/echainiv.c b/crypto/echainiv.c index 4a2f02baba14..69686668625e 100644 --- a/crypto/echainiv.c +++ b/crypto/echainiv.c @@ -115,7 +115,7 @@ static int echainiv_aead_create(struct crypto_template *tmpl, struct aead_instance *inst; int err; - inst = aead_geniv_alloc(tmpl, tb, 0, 0); + inst = aead_geniv_alloc(tmpl, tb); if (IS_ERR(inst)) return PTR_ERR(inst); diff --git a/crypto/geniv.c b/crypto/geniv.c index 6a90c52d49ad..07496c8af0ab 100644 --- a/crypto/geniv.c +++ b/crypto/geniv.c @@ -39,7 +39,7 @@ static void aead_geniv_free(struct aead_instance *inst) } struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, - struct rtattr **tb, u32 type, u32 mask) + struct rtattr **tb) { struct crypto_aead_spawn *spawn; struct crypto_attr_type *algt; @@ -47,6 +47,7 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, struct aead_alg *alg; unsigned int ivsize; unsigned int maxauthsize; + u32 mask; int err; algt = crypto_get_attr_type(tb); @@ -63,10 +64,10 @@ struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, spawn = aead_instance_ctx(inst); /* Ignore async algorithms if necessary. */ - mask |= crypto_requires_sync(algt->type, algt->mask); + mask = crypto_requires_sync(algt->type, algt->mask); err = crypto_grab_aead(spawn, aead_crypto_instance(inst), - crypto_attr_alg_name(tb[1]), type, mask); + crypto_attr_alg_name(tb[1]), 0, mask); if (err) goto err_free_inst; diff --git a/crypto/seqiv.c b/crypto/seqiv.c index f124b9b54e15..e48f875a7aac 100644 --- a/crypto/seqiv.c +++ b/crypto/seqiv.c @@ -138,7 +138,7 @@ static int seqiv_aead_create(struct crypto_template *tmpl, struct rtattr **tb) struct aead_instance *inst; int err; - inst = aead_geniv_alloc(tmpl, tb, 0, 0); + inst = aead_geniv_alloc(tmpl, tb); if (IS_ERR(inst)) return PTR_ERR(inst); diff --git a/include/crypto/internal/geniv.h b/include/crypto/internal/geniv.h index 229d37681a9d..7fd7126f593a 100644 --- a/include/crypto/internal/geniv.h +++ b/include/crypto/internal/geniv.h @@ -20,7 +20,7 @@ struct aead_geniv_ctx { }; struct aead_instance *aead_geniv_alloc(struct crypto_template *tmpl, - struct rtattr **tb, u32 type, u32 mask); + struct rtattr **tb); int aead_init_geniv(struct crypto_aead *tfm); void aead_exit_geniv(struct crypto_aead *tfm); -- 2.27.0