crypto: geode - Kill AES_MIN_BLOCK_SIZE

This is actually defined in include/crypto/aes.h , no need to have
a a different symbol for the same thing twice.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
Cc: Eric Bénard <eric@eukrea.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: Kent Yoder <key@linux.vnet.ibm.com>
Cc: Michal Ludvig <michal@logix.cz>
Cc: Varun Wadekar <vwadekar@nvidia.com>
Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Cc: linux-geode@lists.infradead.org
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Marek Vasut 2014-05-14 11:36:38 +02:00 committed by Herbert Xu
parent 5fc8005ba3
commit b9d865e331
2 changed files with 9 additions and 10 deletions

View File

@ -226,7 +226,7 @@ geode_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
op->dst = (void *) out; op->dst = (void *) out;
op->mode = AES_MODE_ECB; op->mode = AES_MODE_ECB;
op->flags = 0; op->flags = 0;
op->len = AES_MIN_BLOCK_SIZE; op->len = AES_BLOCK_SIZE;
op->dir = AES_DIR_ENCRYPT; op->dir = AES_DIR_ENCRYPT;
geode_aes_crypt(op); geode_aes_crypt(op);
@ -247,7 +247,7 @@ geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in)
op->dst = (void *) out; op->dst = (void *) out;
op->mode = AES_MODE_ECB; op->mode = AES_MODE_ECB;
op->flags = 0; op->flags = 0;
op->len = AES_MIN_BLOCK_SIZE; op->len = AES_BLOCK_SIZE;
op->dir = AES_DIR_DECRYPT; op->dir = AES_DIR_DECRYPT;
geode_aes_crypt(op); geode_aes_crypt(op);
@ -286,7 +286,7 @@ static struct crypto_alg geode_alg = {
CRYPTO_ALG_NEED_FALLBACK, CRYPTO_ALG_NEED_FALLBACK,
.cra_init = fallback_init_cip, .cra_init = fallback_init_cip,
.cra_exit = fallback_exit_cip, .cra_exit = fallback_exit_cip,
.cra_blocksize = AES_MIN_BLOCK_SIZE, .cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct geode_aes_op), .cra_ctxsize = sizeof(struct geode_aes_op),
.cra_module = THIS_MODULE, .cra_module = THIS_MODULE,
.cra_u = { .cra_u = {
@ -320,7 +320,7 @@ geode_cbc_decrypt(struct blkcipher_desc *desc,
op->src = walk.src.virt.addr, op->src = walk.src.virt.addr,
op->dst = walk.dst.virt.addr; op->dst = walk.dst.virt.addr;
op->mode = AES_MODE_CBC; op->mode = AES_MODE_CBC;
op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE); op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
op->dir = AES_DIR_DECRYPT; op->dir = AES_DIR_DECRYPT;
ret = geode_aes_crypt(op); ret = geode_aes_crypt(op);
@ -352,7 +352,7 @@ geode_cbc_encrypt(struct blkcipher_desc *desc,
op->src = walk.src.virt.addr, op->src = walk.src.virt.addr,
op->dst = walk.dst.virt.addr; op->dst = walk.dst.virt.addr;
op->mode = AES_MODE_CBC; op->mode = AES_MODE_CBC;
op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE); op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
op->dir = AES_DIR_ENCRYPT; op->dir = AES_DIR_ENCRYPT;
ret = geode_aes_crypt(op); ret = geode_aes_crypt(op);
@ -396,7 +396,7 @@ static struct crypto_alg geode_cbc_alg = {
CRYPTO_ALG_NEED_FALLBACK, CRYPTO_ALG_NEED_FALLBACK,
.cra_init = fallback_init_blk, .cra_init = fallback_init_blk,
.cra_exit = fallback_exit_blk, .cra_exit = fallback_exit_blk,
.cra_blocksize = AES_MIN_BLOCK_SIZE, .cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct geode_aes_op), .cra_ctxsize = sizeof(struct geode_aes_op),
.cra_alignmask = 15, .cra_alignmask = 15,
.cra_type = &crypto_blkcipher_type, .cra_type = &crypto_blkcipher_type,
@ -432,7 +432,7 @@ geode_ecb_decrypt(struct blkcipher_desc *desc,
op->src = walk.src.virt.addr, op->src = walk.src.virt.addr,
op->dst = walk.dst.virt.addr; op->dst = walk.dst.virt.addr;
op->mode = AES_MODE_ECB; op->mode = AES_MODE_ECB;
op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE); op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
op->dir = AES_DIR_DECRYPT; op->dir = AES_DIR_DECRYPT;
ret = geode_aes_crypt(op); ret = geode_aes_crypt(op);
@ -462,7 +462,7 @@ geode_ecb_encrypt(struct blkcipher_desc *desc,
op->src = walk.src.virt.addr, op->src = walk.src.virt.addr,
op->dst = walk.dst.virt.addr; op->dst = walk.dst.virt.addr;
op->mode = AES_MODE_ECB; op->mode = AES_MODE_ECB;
op->len = nbytes - (nbytes % AES_MIN_BLOCK_SIZE); op->len = nbytes - (nbytes % AES_BLOCK_SIZE);
op->dir = AES_DIR_ENCRYPT; op->dir = AES_DIR_ENCRYPT;
ret = geode_aes_crypt(op); ret = geode_aes_crypt(op);
@ -482,7 +482,7 @@ static struct crypto_alg geode_ecb_alg = {
CRYPTO_ALG_NEED_FALLBACK, CRYPTO_ALG_NEED_FALLBACK,
.cra_init = fallback_init_blk, .cra_init = fallback_init_blk,
.cra_exit = fallback_exit_blk, .cra_exit = fallback_exit_blk,
.cra_blocksize = AES_MIN_BLOCK_SIZE, .cra_blocksize = AES_BLOCK_SIZE,
.cra_ctxsize = sizeof(struct geode_aes_op), .cra_ctxsize = sizeof(struct geode_aes_op),
.cra_alignmask = 15, .cra_alignmask = 15,
.cra_type = &crypto_blkcipher_type, .cra_type = &crypto_blkcipher_type,

View File

@ -12,7 +12,6 @@
/* driver logic flags */ /* driver logic flags */
#define AES_IV_LENGTH 16 #define AES_IV_LENGTH 16
#define AES_KEY_LENGTH 16 #define AES_KEY_LENGTH 16
#define AES_MIN_BLOCK_SIZE 16
#define AES_MODE_ECB 0 #define AES_MODE_ECB 0
#define AES_MODE_CBC 1 #define AES_MODE_CBC 1