Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329736
b: refs/heads/master
c: 2af8f4a
h: refs/heads/master
v: v3
  • Loading branch information
Kim Phillips authored and Herbert Xu committed Sep 6, 2012
1 parent 015fba2 commit 51f89cf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 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: 6bbb98ddfc8db769c1675cc8d829ce720a735fc6
refs/heads/master: 2af8f4a2727998eb3f4ff1edfffaca99955ef22e
16 changes: 8 additions & 8 deletions trunk/drivers/crypto/caam/caamalg.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
struct aead_tfm *tfm = &aead->base.crt_aead;
struct caam_ctx *ctx = crypto_aead_ctx(aead);
struct device *jrdev = ctx->jrdev;
bool keys_fit_inline = 0;
bool keys_fit_inline = false;
u32 *key_jump_cmd, *jump_cmd;
u32 geniv, moveiv;
u32 *desc;
Expand All @@ -239,7 +239,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
if (DESC_AEAD_ENC_LEN + DESC_JOB_IO_LEN +
ctx->split_key_pad_len + ctx->enckeylen <=
CAAM_DESC_BYTES_MAX)
keys_fit_inline = 1;
keys_fit_inline = true;

/* aead_encrypt shared descriptor */
desc = ctx->sh_desc_enc;
Expand Down Expand Up @@ -297,7 +297,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
if (DESC_AEAD_DEC_LEN + DESC_JOB_IO_LEN +
ctx->split_key_pad_len + ctx->enckeylen <=
CAAM_DESC_BYTES_MAX)
keys_fit_inline = 1;
keys_fit_inline = true;

desc = ctx->sh_desc_dec;

Expand Down Expand Up @@ -365,7 +365,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
if (DESC_AEAD_GIVENC_LEN + DESC_JOB_IO_LEN +
ctx->split_key_pad_len + ctx->enckeylen <=
CAAM_DESC_BYTES_MAX)
keys_fit_inline = 1;
keys_fit_inline = true;

/* aead_givencrypt shared descriptor */
desc = ctx->sh_desc_givenc;
Expand Down Expand Up @@ -1354,10 +1354,10 @@ static struct aead_edesc *aead_giv_edesc_alloc(struct aead_givcrypt_request
contig &= ~GIV_SRC_CONTIG;
if (dst_nents || iv_dma + ivsize != sg_dma_address(req->dst))
contig &= ~GIV_DST_CONTIG;
if (unlikely(req->src != req->dst)) {
dst_nents = dst_nents ? : 1;
sec4_sg_len += 1;
}
if (unlikely(req->src != req->dst)) {
dst_nents = dst_nents ? : 1;
sec4_sg_len += 1;
}
if (!(contig & GIV_SRC_CONTIG)) {
assoc_nents = assoc_nents ? : 1;
src_nents = src_nents ? : 1;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/crypto/caam/caamhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,10 @@ static u32 hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in,
int ret = 0;

desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA);
if (!desc) {
dev_err(jrdev, "unable to allocate key input memory\n");
return -ENOMEM;
}

init_job_desc(desc, 0);

Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/crypto/caam/key_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ u32 gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len,
int ret = 0;

desc = kmalloc(CAAM_CMD_SZ * 6 + CAAM_PTR_SZ * 2, GFP_KERNEL | GFP_DMA);
if (!desc) {
dev_err(jrdev, "unable to allocate key input memory\n");
return -ENOMEM;
}

init_job_desc(desc, 0);

Expand Down

0 comments on commit 51f89cf

Please sign in to comment.