Skip to content

Commit

Permalink
crypto: inside-secure - improve the result error format when displayed
Browse files Browse the repository at this point in the history
The result descriptors contain errors, which are represented as a
bitmap. This patch updates the error message to not treat the error as a
decimal value, but as an hexadecimal one. This helps in knowing the
value does not have a direct meaning (the set bits themselves have).

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Antoine Tenart authored and Herbert Xu committed Jun 6, 2019
1 parent 709ecc1 commit 942d849
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/inside-secure/safexcel.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ inline int safexcel_rdesc_check_errors(struct safexcel_crypto_priv *priv,
if (rdesc->result_data.error_code & 0x407f) {
/* Fatal error (bits 0-7, 14) */
dev_err(priv->dev,
"cipher: result: result descriptor error (%d)\n",
"cipher: result: result descriptor error (0x%x)\n",
rdesc->result_data.error_code);
return -EIO;
} else if (rdesc->result_data.error_code == BIT(9)) {
Expand Down

0 comments on commit 942d849

Please sign in to comment.