aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/crypto/caam/error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c
index bd57a6825f57..7e2d54bffad6 100644
--- a/drivers/crypto/caam/error.c
+++ b/drivers/crypto/caam/error.c
@@ -73,7 +73,7 @@ static void report_ccb_status(u32 status, char *outstr)
73 73
74 report_jump_idx(status, outstr); 74 report_jump_idx(status, outstr);
75 75
76 if (cha_id < sizeof(cha_id_list)) { 76 if (cha_id < ARRAY_SIZE(cha_id_list)) {
77 SPRINTFCAT(outstr, "%s: ", cha_id_list[cha_id], 77 SPRINTFCAT(outstr, "%s: ", cha_id_list[cha_id],
78 strlen(cha_id_list[cha_id])); 78 strlen(cha_id_list[cha_id]));
79 } else { 79 } else {
@@ -81,7 +81,7 @@ static void report_ccb_status(u32 status, char *outstr)
81 cha_id, sizeof("ff")); 81 cha_id, sizeof("ff"));
82 } 82 }
83 83
84 if (err_id < sizeof(err_id_list)) { 84 if (err_id < ARRAY_SIZE(err_id_list)) {
85 SPRINTFCAT(outstr, "%s", err_id_list[err_id], 85 SPRINTFCAT(outstr, "%s", err_id_list[err_id],
86 strlen(err_id_list[err_id])); 86 strlen(err_id_list[err_id]));
87 } else { 87 } else {
@@ -198,11 +198,11 @@ static void report_deco_status(u32 status, char *outstr)
198 198
199 report_jump_idx(status, outstr); 199 report_jump_idx(status, outstr);
200 200
201 for (i = 0; i < sizeof(desc_error_list); i++) 201 for (i = 0; i < ARRAY_SIZE(desc_error_list); i++)
202 if (desc_error_list[i].value == desc_error) 202 if (desc_error_list[i].value == desc_error)
203 break; 203 break;
204 204
205 if (i != sizeof(desc_error_list) && desc_error_list[i].error_text) { 205 if (i != ARRAY_SIZE(desc_error_list) && desc_error_list[i].error_text) {
206 SPRINTFCAT(outstr, "%s", desc_error_list[i].error_text, 206 SPRINTFCAT(outstr, "%s", desc_error_list[i].error_text,
207 strlen(desc_error_list[i].error_text)); 207 strlen(desc_error_list[i].error_text));
208 } else { 208 } else {