crypto: caam - Contain caam_jr_strstatus() ugliness
The tentacles of this function were firmly attached to various places in the CAAM code. Just cut them, or this cthulhu function will sprout them anew. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Horia Geanta <horia.geanta@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -633,11 +633,8 @@ static void ahash_done(struct device *jrdev, u32 *desc, u32 err,
|
||||
|
||||
edesc = (struct ahash_edesc *)((char *)desc -
|
||||
offsetof(struct ahash_edesc, hw_desc));
|
||||
if (err) {
|
||||
char tmp[CAAM_ERROR_STR_MAX];
|
||||
|
||||
dev_err(jrdev, "%08x: %s\n", err, caam_jr_strstatus(tmp, err));
|
||||
}
|
||||
if (err)
|
||||
caam_jr_strstatus(jrdev, err);
|
||||
|
||||
ahash_unmap(jrdev, edesc, req, digestsize);
|
||||
kfree(edesc);
|
||||
@@ -671,11 +668,8 @@ static void ahash_done_bi(struct device *jrdev, u32 *desc, u32 err,
|
||||
|
||||
edesc = (struct ahash_edesc *)((char *)desc -
|
||||
offsetof(struct ahash_edesc, hw_desc));
|
||||
if (err) {
|
||||
char tmp[CAAM_ERROR_STR_MAX];
|
||||
|
||||
dev_err(jrdev, "%08x: %s\n", err, caam_jr_strstatus(tmp, err));
|
||||
}
|
||||
if (err)
|
||||
caam_jr_strstatus(jrdev, err);
|
||||
|
||||
ahash_unmap_ctx(jrdev, edesc, req, ctx->ctx_len, DMA_BIDIRECTIONAL);
|
||||
kfree(edesc);
|
||||
@@ -709,11 +703,8 @@ static void ahash_done_ctx_src(struct device *jrdev, u32 *desc, u32 err,
|
||||
|
||||
edesc = (struct ahash_edesc *)((char *)desc -
|
||||
offsetof(struct ahash_edesc, hw_desc));
|
||||
if (err) {
|
||||
char tmp[CAAM_ERROR_STR_MAX];
|
||||
|
||||
dev_err(jrdev, "%08x: %s\n", err, caam_jr_strstatus(tmp, err));
|
||||
}
|
||||
if (err)
|
||||
caam_jr_strstatus(jrdev, err);
|
||||
|
||||
ahash_unmap_ctx(jrdev, edesc, req, digestsize, DMA_FROM_DEVICE);
|
||||
kfree(edesc);
|
||||
@@ -747,11 +738,8 @@ static void ahash_done_ctx_dst(struct device *jrdev, u32 *desc, u32 err,
|
||||
|
||||
edesc = (struct ahash_edesc *)((char *)desc -
|
||||
offsetof(struct ahash_edesc, hw_desc));
|
||||
if (err) {
|
||||
char tmp[CAAM_ERROR_STR_MAX];
|
||||
|
||||
dev_err(jrdev, "%08x: %s\n", err, caam_jr_strstatus(tmp, err));
|
||||
}
|
||||
if (err)
|
||||
caam_jr_strstatus(jrdev, err);
|
||||
|
||||
ahash_unmap_ctx(jrdev, edesc, req, ctx->ctx_len, DMA_TO_DEVICE);
|
||||
kfree(edesc);
|
||||
|
Reference in New Issue
Block a user