diff options
author | Kim Phillips <kim.phillips@freescale.com> | 2013-03-26 19:10:15 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-04-25 09:01:43 -0400 |
commit | 96aef9a8ba37da48f2ae9612ccd0f6b7bc0542eb (patch) | |
tree | 207491844cb49dafaceb77293cfda7f57dd8f6a3 /drivers/crypto | |
parent | 66b3e8879f42a571e6779a6c4e5ed486aaaf6fef (diff) |
crypto: caam - static constify error data
checkstack reports report_deco_status(), report_ccb_status() as
particularly excessive stack users. Move their lookup tables
off the stack and put them in .rodata.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/caam/error.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index 30b8f74833d4..9f25f5296029 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c | |||
@@ -36,7 +36,7 @@ static void report_jump_idx(u32 status, char *outstr) | |||
36 | 36 | ||
37 | static void report_ccb_status(u32 status, char *outstr) | 37 | static void report_ccb_status(u32 status, char *outstr) |
38 | { | 38 | { |
39 | char *cha_id_list[] = { | 39 | static const char * const cha_id_list[] = { |
40 | "", | 40 | "", |
41 | "AES", | 41 | "AES", |
42 | "DES", | 42 | "DES", |
@@ -51,7 +51,7 @@ static void report_ccb_status(u32 status, char *outstr) | |||
51 | "ZUCE", | 51 | "ZUCE", |
52 | "ZUCA", | 52 | "ZUCA", |
53 | }; | 53 | }; |
54 | char *err_id_list[] = { | 54 | static const char * const err_id_list[] = { |
55 | "No error.", | 55 | "No error.", |
56 | "Mode error.", | 56 | "Mode error.", |
57 | "Data size error.", | 57 | "Data size error.", |
@@ -69,7 +69,7 @@ static void report_ccb_status(u32 status, char *outstr) | |||
69 | "Invalid CHA combination was selected", | 69 | "Invalid CHA combination was selected", |
70 | "Invalid CHA selected.", | 70 | "Invalid CHA selected.", |
71 | }; | 71 | }; |
72 | char *rng_err_id_list[] = { | 72 | static const char * const rng_err_id_list[] = { |
73 | "", | 73 | "", |
74 | "", | 74 | "", |
75 | "", | 75 | "", |
@@ -117,7 +117,7 @@ static void report_jump_status(u32 status, char *outstr) | |||
117 | 117 | ||
118 | static void report_deco_status(u32 status, char *outstr) | 118 | static void report_deco_status(u32 status, char *outstr) |
119 | { | 119 | { |
120 | const struct { | 120 | static const struct { |
121 | u8 value; | 121 | u8 value; |
122 | char *error_text; | 122 | char *error_text; |
123 | } desc_error_list[] = { | 123 | } desc_error_list[] = { |
@@ -245,7 +245,7 @@ static void report_cond_code_status(u32 status, char *outstr) | |||
245 | 245 | ||
246 | char *caam_jr_strstatus(char *outstr, u32 status) | 246 | char *caam_jr_strstatus(char *outstr, u32 status) |
247 | { | 247 | { |
248 | struct stat_src { | 248 | static const struct stat_src { |
249 | void (*report_ssed)(u32 status, char *outstr); | 249 | void (*report_ssed)(u32 status, char *outstr); |
250 | char *error; | 250 | char *error; |
251 | } status_src[] = { | 251 | } status_src[] = { |