From fa9659cd4d3f40cead6263986cc235f3e67ab872 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 24 Apr 2014 20:05:12 +0200 Subject: 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 Cc: Herbert Xu Cc: Horia Geanta Signed-off-by: Herbert Xu --- drivers/crypto/caam/error.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/crypto/caam/error.c') diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index 9f25f5296029..ba426d902783 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c @@ -243,8 +243,9 @@ static void report_cond_code_status(u32 status, char *outstr) SPRINTFCAT(outstr, "%s() not implemented", __func__, sizeof(__func__)); } -char *caam_jr_strstatus(char *outstr, u32 status) +void caam_jr_strstatus(struct device *jrdev, u32 status) { + char outstr[CAAM_ERROR_STR_MAX]; static const struct stat_src { void (*report_ssed)(u32 status, char *outstr); char *error; @@ -265,6 +266,6 @@ char *caam_jr_strstatus(char *outstr, u32 status) if (status_src[ssrc].report_ssed) status_src[ssrc].report_ssed(status, outstr); - return outstr; + dev_err(jrdev, "%08x: %s\n", status, outstr); } EXPORT_SYMBOL(caam_jr_strstatus); -- cgit v1.2.1