public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: mark crypto_alloc_tfm() __deprecated
@ 2006-10-10 12:48 Akinobu Mita
  2006-10-11 12:32 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Akinobu Mita @ 2006-10-10 12:48 UTC (permalink / raw)
  To: linux-kernel; +Cc: Herbert Xu, David S. Miller

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 <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>

 crypto/tcrypt.c        |    4 ++--
 include/linux/crypto.h |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

Index: work-fault-inject/include/linux/crypto.h
===================================================================
--- work-fault-inject.orig/include/linux/crypto.h
+++ 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);
 
Index: work-fault-inject/crypto/tcrypt.c
===================================================================
--- work-fault-inject.orig/crypto/tcrypt.c
+++ 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;
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-11 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10 12:48 [PATCH] crypto: mark crypto_alloc_tfm() __deprecated Akinobu Mita
2006-10-11 12:32 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox