mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
crypto: caam - Dissolve report_jump_idx()
Just dissolve this function so it's not in the way of applying further white magic cleanup down the line. 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:
parent
e75880dd9a
commit
526243cc87
1 changed files with 17 additions and 15 deletions
|
@ -168,19 +168,6 @@ static const char * const rng_err_id_list[] = {
|
||||||
kfree(tmp); \
|
kfree(tmp); \
|
||||||
}
|
}
|
||||||
|
|
||||||
static void report_jump_idx(u32 status, char *outstr)
|
|
||||||
{
|
|
||||||
u8 idx = (status & JRSTA_DECOERR_INDEX_MASK) >>
|
|
||||||
JRSTA_DECOERR_INDEX_SHIFT;
|
|
||||||
|
|
||||||
if (status & JRSTA_DECOERR_JUMP)
|
|
||||||
strcat(outstr, "jump tgt desc idx ");
|
|
||||||
else
|
|
||||||
strcat(outstr, "desc idx ");
|
|
||||||
|
|
||||||
SPRINTFCAT(outstr, "%d: ", idx, sizeof("255"));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void report_ccb_status(struct device *jrdev, u32 status,
|
static void report_ccb_status(struct device *jrdev, u32 status,
|
||||||
const char *error, char *__outstr)
|
const char *error, char *__outstr)
|
||||||
{
|
{
|
||||||
|
@ -189,10 +176,17 @@ static void report_ccb_status(struct device *jrdev, u32 status,
|
||||||
u8 cha_id = (status & JRSTA_CCBERR_CHAID_MASK) >>
|
u8 cha_id = (status & JRSTA_CCBERR_CHAID_MASK) >>
|
||||||
JRSTA_CCBERR_CHAID_SHIFT;
|
JRSTA_CCBERR_CHAID_SHIFT;
|
||||||
u8 err_id = status & JRSTA_CCBERR_ERRID_MASK;
|
u8 err_id = status & JRSTA_CCBERR_ERRID_MASK;
|
||||||
|
u8 idx = (status & JRSTA_DECOERR_INDEX_MASK) >>
|
||||||
|
JRSTA_DECOERR_INDEX_SHIFT;
|
||||||
|
|
||||||
sprintf(outstr, "%s: ", error);
|
sprintf(outstr, "%s: ", error);
|
||||||
|
|
||||||
report_jump_idx(status, outstr);
|
if (status & JRSTA_DECOERR_JUMP)
|
||||||
|
strcat(outstr, "jump tgt desc idx ");
|
||||||
|
else
|
||||||
|
strcat(outstr, "desc idx ");
|
||||||
|
|
||||||
|
SPRINTFCAT(outstr, "%d: ", idx, sizeof("255"));
|
||||||
|
|
||||||
if (cha_id < ARRAY_SIZE(cha_id_list)) {
|
if (cha_id < ARRAY_SIZE(cha_id_list)) {
|
||||||
SPRINTFCAT(outstr, "%s: ", cha_id_list[cha_id],
|
SPRINTFCAT(outstr, "%s: ", cha_id_list[cha_id],
|
||||||
|
@ -232,10 +226,18 @@ static void report_deco_status(struct device *jrdev, u32 status,
|
||||||
char outstr[CAAM_ERROR_STR_MAX];
|
char outstr[CAAM_ERROR_STR_MAX];
|
||||||
|
|
||||||
u8 desc_error = status & JRSTA_DECOERR_ERROR_MASK;
|
u8 desc_error = status & JRSTA_DECOERR_ERROR_MASK;
|
||||||
|
u8 idx = (status & JRSTA_DECOERR_INDEX_MASK) >>
|
||||||
|
JRSTA_DECOERR_INDEX_SHIFT;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
sprintf(outstr, "%s: ", error);
|
sprintf(outstr, "%s: ", error);
|
||||||
|
|
||||||
report_jump_idx(status, outstr);
|
if (status & JRSTA_DECOERR_JUMP)
|
||||||
|
strcat(outstr, "jump tgt desc idx ");
|
||||||
|
else
|
||||||
|
strcat(outstr, "desc idx ");
|
||||||
|
|
||||||
|
SPRINTFCAT(outstr, "%d: ", idx, sizeof("255"));
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(desc_error_list); i++)
|
for (i = 0; i < ARRAY_SIZE(desc_error_list); i++)
|
||||||
if (desc_error_list[i].value == desc_error)
|
if (desc_error_list[i].value == desc_error)
|
||||||
|
|
Loading…
Reference in a new issue