Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283312
b: refs/heads/master
c: 88715b9
h: refs/heads/master
v: v3
  • Loading branch information
Jussi Kivilinna authored and Herbert Xu committed Dec 20, 2011
1 parent fa080a3 commit 6a81155
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e7cda5d27ed3febf277fe410687c977ae1a31a25
refs/heads/master: 88715b9ade718564fd8b1318735826370481366b
32 changes: 0 additions & 32 deletions trunk/arch/x86/crypto/twofish_glue_3way.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@
#include <crypto/lrw.h>
#include <crypto/xts.h>

#if defined(CONFIG_CRYPTO_LRW) || defined(CONFIG_CRYPTO_LRW_MODULE)
#define HAS_LRW
#endif

#if defined(CONFIG_CRYPTO_XTS) || defined(CONFIG_CRYPTO_XTS_MODULE)
#define HAS_XTS
#endif

/* regular block cipher functions from twofish_x86_64 module */
asmlinkage void twofish_enc_blk(struct twofish_ctx *ctx, u8 *dst,
const u8 *src);
Expand Down Expand Up @@ -442,8 +434,6 @@ static struct crypto_alg blk_ctr_alg = {
},
};

#if defined(HAS_LRW) || defined(HAS_XTS)

static void encrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes)
{
const unsigned int bsize = TF_BLOCK_SIZE;
Expand Down Expand Up @@ -474,10 +464,6 @@ static void decrypt_callback(void *priv, u8 *srcdst, unsigned int nbytes)
twofish_dec_blk(ctx, srcdst, srcdst);
}

#endif

#ifdef HAS_LRW

struct twofish_lrw_ctx {
struct lrw_table_ctx lrw_table;
struct twofish_ctx twofish_ctx;
Expand Down Expand Up @@ -562,10 +548,6 @@ static struct crypto_alg blk_lrw_alg = {
},
};

#endif

#ifdef HAS_XTS

struct twofish_xts_ctx {
struct twofish_ctx tweak_ctx;
struct twofish_ctx crypt_ctx;
Expand Down Expand Up @@ -655,8 +637,6 @@ static struct crypto_alg blk_xts_alg = {
},
};

#endif

int __init init(void)
{
int err;
Expand All @@ -670,27 +650,19 @@ int __init init(void)
err = crypto_register_alg(&blk_ctr_alg);
if (err)
goto ctr_err;
#ifdef HAS_LRW
err = crypto_register_alg(&blk_lrw_alg);
if (err)
goto blk_lrw_err;
#endif
#ifdef HAS_XTS
err = crypto_register_alg(&blk_xts_alg);
if (err)
goto blk_xts_err;
#endif

return 0;

#ifdef HAS_XTS
crypto_unregister_alg(&blk_xts_alg);
blk_xts_err:
#endif
#ifdef HAS_LRW
crypto_unregister_alg(&blk_lrw_alg);
blk_lrw_err:
#endif
crypto_unregister_alg(&blk_ctr_alg);
ctr_err:
crypto_unregister_alg(&blk_cbc_alg);
Expand All @@ -702,12 +674,8 @@ int __init init(void)

void __exit fini(void)
{
#ifdef HAS_XTS
crypto_unregister_alg(&blk_xts_alg);
#endif
#ifdef HAS_LRW
crypto_unregister_alg(&blk_lrw_alg);
#endif
crypto_unregister_alg(&blk_ctr_alg);
crypto_unregister_alg(&blk_cbc_alg);
crypto_unregister_alg(&blk_ecb_alg);
Expand Down

0 comments on commit 6a81155

Please sign in to comment.