Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1715766rdb; Mon, 2 Oct 2023 20:46:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkNU6XXf/Yc7tJ38wh2R2DZ7I84KUZ+QdgmxfD85Hs0/l4za/f2KpCOxGEGagcwboIdQUF X-Received: by 2002:a05:6102:185:b0:452:bf74:bcec with SMTP id r5-20020a056102018500b00452bf74bcecmr11789140vsq.10.1696304766741; Mon, 02 Oct 2023 20:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696304766; cv=none; d=google.com; s=arc-20160816; b=lXb7nO8eqg5DUGlGGRcgkj13dqtDPuB+9FpQ0YZgk47ydWisBUeU0nYo7FYwEvEEAm 0mrph4KKyRQwQmMBktJPIK2bKW0YTYYVuYNaTSpZIWe5h0hB97uU3RlvDKm7kMvgvuof ZJaxXo9WGoh8KXEqaqd0vQi3zvxwKw6DSTLX4JaUZgBhAONy1UfXNAS22G3OqIhpzEFb QIexkyzZEV452tXXq9UA/q8PgVSzQmLWrb3LcM8PBwkkqA4E2b2xxrm8t2L7nwuseWbT H6Bni+B6AbymrW8Oi/EJ2GVi9IwbMrvs7pHbLY8M3pkiuOvfr1BTbbuZk7suywq/0g7Q ZMog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=RSqpQUA4FLR9bOSBwOPB7JFF2vxUb1Yq4kobkaOUKBY=; fh=l82EBe4859Giv8r8zr9oFIexxRwnYkkBFWiaDDuu954=; b=iL7Q3I3d7LsTrl1E0vNegtfMfd61GNONqpsyjmfHJAwLugWeEA2iZOaOiXnhJit1Yu My/jSedkX3u+dzNzDOiGJqSryGBxU35A1kvyjDOJXq5V21r+SGyMdBfAJAPg4oJTyS9r KVK4AclQSzvSI8UhExNIffgfzrDf1XdW+RJvIKSBQNoPn9JmqxgQTVW+gY66Bj/8M5b+ zN9kci5NIzr9j730Zl735jIh6gYvIziB2ZlnOvmOa4Z4JmObxW9fUZQ9W9tPNMaKq8Bv 2rQuznZ8wSeyAAYpdSw4718vToxq+ytrmYy9YeSgVNA9xJEftf1UtpY9FptRYG/Mth4N 5zcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id m9-20020a654389000000b005649d5fc097si481030pgp.820.2023.10.02.20.46.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 20:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 64CA78076D07; Mon, 2 Oct 2023 20:45:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230132AbjJCDpL (ORCPT + 99 others); Mon, 2 Oct 2023 23:45:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbjJCDo5 (ORCPT ); Mon, 2 Oct 2023 23:44:57 -0400 Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DDB8DA for ; Mon, 2 Oct 2023 20:44:53 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1qnWL2-002wUd-BJ; Tue, 03 Oct 2023 11:44:49 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Tue, 03 Oct 2023 11:44:52 +0800 From: Herbert Xu To: Linux Crypto Mailing List Cc: Shinichiro Kawasaki , Herbert Xu Subject: [PATCH 16/16] crypto: skcipher - Remove obsolete skcipher_alg helpers Date: Tue, 3 Oct 2023 11:43:33 +0800 Message-Id: <20231003034333.1441826-17-herbert@gondor.apana.org.au> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003034333.1441826-1-herbert@gondor.apana.org.au> References: <20231003034333.1441826-1-herbert@gondor.apana.org.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 02 Oct 2023 20:45:17 -0700 (PDT) As skcipher spawn users can no longer assume the spawn is of type struct skcipher_alg, these helpers are no longer used. Remove them. Signed-off-by: Herbert Xu --- include/crypto/internal/skcipher.h | 42 ------------------------------ include/crypto/skcipher.h | 25 +----------------- 2 files changed, 1 insertion(+), 66 deletions(-) diff --git a/include/crypto/internal/skcipher.h b/include/crypto/internal/skcipher.h index c767b5cfbd9c..7ae42afdcf3e 100644 --- a/include/crypto/internal/skcipher.h +++ b/include/crypto/internal/skcipher.h @@ -148,12 +148,6 @@ static inline void crypto_drop_lskcipher(struct crypto_lskcipher_spawn *spawn) crypto_drop_spawn(&spawn->base); } -static inline struct skcipher_alg *crypto_skcipher_spawn_alg( - struct crypto_skcipher_spawn *spawn) -{ - return container_of(spawn->base.alg, struct skcipher_alg, base); -} - static inline struct lskcipher_alg *crypto_lskcipher_spawn_alg( struct crypto_lskcipher_spawn *spawn) { @@ -166,12 +160,6 @@ static inline struct skcipher_alg_common *crypto_spawn_skcipher_alg_common( return container_of(spawn->base.alg, struct skcipher_alg_common, base); } -static inline struct skcipher_alg *crypto_spawn_skcipher_alg( - struct crypto_skcipher_spawn *spawn) -{ - return crypto_skcipher_spawn_alg(spawn); -} - static inline struct lskcipher_alg *crypto_spawn_lskcipher_alg( struct crypto_lskcipher_spawn *spawn) { @@ -269,36 +257,6 @@ static inline u32 skcipher_request_flags(struct skcipher_request *req) return req->base.flags; } -static inline unsigned int crypto_skcipher_alg_min_keysize( - struct skcipher_alg *alg) -{ - return alg->min_keysize; -} - -static inline unsigned int crypto_skcipher_alg_max_keysize( - struct skcipher_alg *alg) -{ - return alg->max_keysize; -} - -static inline unsigned int crypto_skcipher_alg_walksize( - struct skcipher_alg *alg) -{ - return alg->walksize; -} - -static inline unsigned int crypto_lskcipher_alg_min_keysize( - struct lskcipher_alg *alg) -{ - return alg->co.min_keysize; -} - -static inline unsigned int crypto_lskcipher_alg_max_keysize( - struct lskcipher_alg *alg) -{ - return alg->co.max_keysize; -} - /* Helpers for simple block cipher modes of operation */ struct skcipher_ctx_simple { struct crypto_cipher *cipher; /* underlying block cipher */ diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h index a648ef5ce897..ea18af48346b 100644 --- a/include/crypto/skcipher.h +++ b/include/crypto/skcipher.h @@ -395,17 +395,6 @@ static inline struct lskcipher_alg *crypto_lskcipher_alg( struct lskcipher_alg, co.base); } -static inline unsigned int crypto_skcipher_alg_ivsize(struct skcipher_alg *alg) -{ - return alg->ivsize; -} - -static inline unsigned int crypto_lskcipher_alg_ivsize( - struct lskcipher_alg *alg) -{ - return alg->co.ivsize; -} - /** * crypto_skcipher_ivsize() - obtain IV size * @tfm: cipher handle @@ -473,18 +462,6 @@ static inline unsigned int crypto_lskcipher_blocksize( return crypto_tfm_alg_blocksize(crypto_lskcipher_tfm(tfm)); } -static inline unsigned int crypto_skcipher_alg_chunksize( - struct skcipher_alg *alg) -{ - return alg->chunksize; -} - -static inline unsigned int crypto_lskcipher_alg_chunksize( - struct lskcipher_alg *alg) -{ - return alg->co.chunksize; -} - /** * crypto_skcipher_chunksize() - obtain chunk size * @tfm: cipher handle @@ -516,7 +493,7 @@ static inline unsigned int crypto_skcipher_chunksize( static inline unsigned int crypto_lskcipher_chunksize( struct crypto_lskcipher *tfm) { - return crypto_lskcipher_alg_chunksize(crypto_lskcipher_alg(tfm)); + return crypto_lskcipher_alg(tfm)->co.chunksize; } static inline unsigned int crypto_sync_skcipher_blocksize( -- 2.39.2