Commit 2529bc37 authored by LEROY Christophe's avatar LEROY Christophe Committed by Herbert Xu

crypto: talitos - Use zero entry to init descriptors ptrs to zero

Do use zero_entry value to init the descriptors ptrs to zero instead of
writing 0 in each field
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 8e0498d9
...@@ -1373,9 +1373,7 @@ static int common_nonsnoop(struct talitos_edesc *edesc, ...@@ -1373,9 +1373,7 @@ static int common_nonsnoop(struct talitos_edesc *edesc,
int sg_count, ret; int sg_count, ret;
/* first DWORD empty */ /* first DWORD empty */
desc->ptr[0].len = 0; desc->ptr[0] = zero_entry;
to_talitos_ptr(&desc->ptr[0], 0);
desc->ptr[0].j_extent = 0;
/* cipher iv */ /* cipher iv */
to_talitos_ptr(&desc->ptr[1], edesc->iv_dma); to_talitos_ptr(&desc->ptr[1], edesc->iv_dma);
...@@ -1445,9 +1443,7 @@ static int common_nonsnoop(struct talitos_edesc *edesc, ...@@ -1445,9 +1443,7 @@ static int common_nonsnoop(struct talitos_edesc *edesc,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
/* last DWORD empty */ /* last DWORD empty */
desc->ptr[6].len = 0; desc->ptr[6] = zero_entry;
to_talitos_ptr(&desc->ptr[6], 0);
desc->ptr[6].j_extent = 0;
ret = talitos_submit(dev, ctx->ch, desc, callback, areq); ret = talitos_submit(dev, ctx->ch, desc, callback, areq);
if (ret != -EINPROGRESS) { if (ret != -EINPROGRESS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment