Skip to contentSkip to conversation

crypto: mark crypto_alloc_tfm() __deprecated

PATCH In review Akinobu Mita 2 participants 2 messages Oct 10, 2006 – Oct 11, 2006 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: mark crypto_alloc_tfm() __deprecated

This patch marks crypto_alloc_tfm() as __deprecated. And converts from crypto_alloc_tfm() to crypto_alloc_comp() in tcrypt crypto testing module.

Cc Herbert Xu <[email protected]>
Cc "David S. Miller" <[email protected]>
 crypto/tcrypt.c        |    4 ++--
 include/linux/crypto.h |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
include/linux/crypto.h +2 -1
Index: work-fault-inject/include/linux/crypto.h
===================================================================
@@ -367,7 +367,8 @@ struct crypto_attr_alg {
  * Transform user interface.
  */
  
-struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, u32 tfm_flags);
+struct crypto_tfm *crypto_alloc_tfm(const char *alg_name, u32 tfm_flags)
+	__deprecated;
 struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask);
 void crypto_free_tfm(struct crypto_tfm *tfm);
 
crypto/tcrypt.c +2 -2
Index: work-fault-inject/crypto/tcrypt.c
===================================================================
@@ -765,8 +765,8 @@ static void test_deflate(void)
 	memcpy(tvmem, deflate_comp_tv_template, tsize);
 	tv = (void *)tvmem;
 
-	tfm = crypto_alloc_tfm("deflate", 0);
-	if (tfm == NULL) {
+	tfm = crypto_alloc_comp("deflate", 0, CRYPTO_ALG_ASYNC);
+	if (IS_ERR(tfm)) {
 		printk("failed to load transform for deflate\n");
 		return;
 	}
maintainer
#1 lore raw
Quoted 7 lines · Akinobu Mita

This patch marks crypto_alloc_tfm() as __deprecated. And converts from crypto_alloc_tfm() to crypto_alloc_comp() in tcrypt crypto testing module.

Cc Herbert Xu <[email protected]>
Cc "David S. Miller" <[email protected]>

Thanks, I've applied both of your patches.

Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt